-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add Dev NPS Survey Log & semaphore.signal() in Decide #537
Changes from 4 commits
a68e4f1
68064fb
2ea2fb3
f55a978
6cb192d
4e91d20
c06cad4
b9d7f37
f85df7c
c9ade18
bbecb7a
2247997
e1f30b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,12 +128,12 @@ class Network { | |
parse: parse) | ||
} | ||
|
||
class func trackIntegration(apiToken: String, serverURL: String, completion: @escaping (Bool) -> Void) { | ||
let requestData = JSONHandler.encodeAPIData([["event": "Integration", | ||
"properties": ["token": "85053bf24bba75239b16a601d9387e17", | ||
class func trackEvent(eventName: String, apiToken: String, distinctId: String, completion: @escaping (Bool) -> Void) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better rename it or put some comments to avoid people using it by mistake. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. might not be an issue for SPM but could be an issue if they include the source code. |
||
let requestData = JSONHandler.encodeAPIData([["event": eventName, | ||
"properties": ["token": apiToken, | ||
"mp_lib": "swift", | ||
"version": "3.0", | ||
"distinct_id": apiToken, | ||
"distinct_id": distinctId, | ||
"$lib_version": AutomaticProperties.libVersion()]]]) | ||
|
||
let responseParser: (Data) -> Int? = { data in | ||
|
@@ -154,14 +154,14 @@ class Network { | |
headers: ["Accept-Encoding": "gzip"], | ||
parse: responseParser) | ||
|
||
Network.apiRequest(base: serverURL, | ||
Network.apiRequest(base: BasePath.DefaultMixpanelAPI, | ||
resource: resource, | ||
failure: { (_, _, _) in | ||
Logger.debug(message: "failed to track integration") | ||
Logger.debug(message: "failed to track \(eventName)") | ||
completion(false) | ||
}, | ||
success: { (_, _) in | ||
Logger.debug(message: "integration tracked") | ||
Logger.debug(message: "\(eventName) tracked") | ||
completion(true) | ||
} | ||
) | ||
|
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.
would be nice to add the property
surveyShownCount
as well