-
Notifications
You must be signed in to change notification settings - Fork 995
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
[Connect] Add analytic events (part 1/2) #4238
Merged
mludowise-stripe
merged 8 commits into
master
from
mludowise/MXMOBILE-2491_connect_analytics2
Nov 13, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5da51c2
Analytic events
mludowise-stripe 83e319e
rm dead code
mludowise-stripe 7928c03
docstrings
mludowise-stripe 117546c
comment
mludowise-stripe 60b7bdd
fix tests
mludowise-stripe 52dc5d6
revert accidental change
mludowise-stripe 6f7f586
MessageSenderError
mludowise-stripe d8e31ef
Use MockComponentAnalyticsClient
mludowise-stripe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
StripeConnect/StripeConnect/Source/Internal/Analytics/AnalyticsClientV2+Connect.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// AnalyticsClientV2+Connect.swift | ||
// StripeConnect | ||
// | ||
// Created by Mel Ludowise on 10/4/24. | ||
// | ||
|
||
@_spi(STP) import StripeCore | ||
|
||
extension AnalyticsClientV2 { | ||
static let sharedConnect = AnalyticsClientV2( | ||
clientId: "mobile_connect_sdk", | ||
origin: "stripe-connect-ios" | ||
) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a factory pattern for test injection.
Initially I tried adding an
AnalyticsClientV2
instance and was planning to useMockAnalyticsClientV2
in tests. But when I started writing tests in #4239, I realized thatMockAnalyticsClientV2
would force us to test against the raw analytics payload and we'd be better served by our own Mock (MockComponentAnalyticsClient
) so we could test on theComponentAnalyticEvent
types rather than a raw payload.