Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow any dimension value for ParseAnalytics #341

Merged
merged 7 commits into from
Feb 7, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Feb 7, 2022

New Pull Request Checklist

Issue Description

Dimension values currently can only be String type. This use to be the requirement for the original Parse Server, but some analytics adapters can support types other than String. The Swift Client should allow any type of dimension value.

Also the developer should be responsible for requesting tracking authorization when sending analytics to other companies instead of the SDK.

Related issue: #n/a

Approach

Let the OS and developer decide if app tracking authorization is required when using ParseAnalytics. ParseAnalytics can now take any Codable value in its' dimensions instead of just strings. Added a new property date to ParseAnalytics. The at property will be deprecated in ParseSwift 5.0.0, so developers should switch to date. ParseAnalytics can now be properly decoded after encoding with a JSONEncoder. This is useful if ParseAnalytics type need to be stored locally and sent to the server later.

TODOs before merging

  • Add tests
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Feb 7, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #341 (4caeb51) into main (5307210) will decrease coverage by 0.02%.
The diff coverage is 96.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #341      +/-   ##
==========================================
- Coverage   85.19%   85.16%   -0.03%     
==========================================
  Files         114      114              
  Lines       12208    12195      -13     
==========================================
- Hits        10400    10386      -14     
- Misses       1808     1809       +1     
Impacted Files Coverage Δ
Sources/ParseSwift/Coding/ParseEncoder.swift 74.91% <ø> (ø)
...es/ParseSwift/LiveQuery/ParseLiveQuery+async.swift 72.72% <ø> (ø)
.../ParseSwift/LiveQuery/ParseLiveQuery+combine.swift 72.72% <ø> (ø)
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 72.92% <ø> (-0.60%) ⬇️
Sources/ParseSwift/Types/ParseACL.swift 89.91% <50.00%> (+2.25%) ⬆️
Sources/ParseSwift/Objects/ParseRole.swift 100.00% <100.00%> (ø)
...ources/ParseSwift/Types/ParseAnalytics+async.swift 90.47% <100.00%> (+0.47%) ⬆️
Sources/ParseSwift/Types/ParseAnalytics.swift 97.12% <100.00%> (-0.33%) ⬇️
Sources/ParseSwift/Objects/ParseUser.swift 83.00% <0.00%> (-0.18%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5307210...4caeb51. Read the comment docs.

@cbaker6 cbaker6 merged commit c8252bc into parse-community:main Feb 7, 2022
@cbaker6 cbaker6 deleted the analytics branch February 7, 2022 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant