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

Add Dev NPS Survey Log & semaphore.signal() in Decide #537

Merged
merged 13 commits into from
Apr 21, 2022

Conversation

jaredmixpanel
Copy link
Contributor

@jaredmixpanel jaredmixpanel commented Apr 14, 2022

Adds a function that will occasionally log a link to our developer experience NPS survey
Adds an additional semaphore.signal() in Decide as a possible fix for #532

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor

Choose a reason for hiding this comment

The 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.

'---------------------------------------------------------------------------------'
""")
UserDefaults.standard.set(surveyShownCount + 1, forKey: "MPSurveyShownCount")
Network.trackEvent(eventName: "Dev NPS Survey Logged", apiToken: "metrics-1", distinctId: distinctId) { (_) in }
Copy link
Contributor

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

Copy link
Contributor

@zihejia zihejia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaredmixpanel jaredmixpanel changed the title Add Dev NPS Survey Log Add Dev NPS Survey Log & semaphore.signal() in Decide Apr 21, 2022
@jaredmixpanel jaredmixpanel merged commit dc17a7d into master Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants