-
Notifications
You must be signed in to change notification settings - Fork 9
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
Adds anonymous Id to segment #29
Conversation
pages/_app.tsx
Outdated
userId: publicRuntimeConfig.segmentUserId, | ||
const event: SegmentEvent = { | ||
type: 'track', | ||
anonymousId: analytics.user().anonymousId(), |
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.
Is there any situation where this can return nil
or empty? Just wondering what happens if the user has an ad blocker or disables cookie tracking, can we still generate an anonymous ID? If not, we should default to the generic client
name if that's the case
pages/_app.tsx
Outdated
const region = getUserRegion(router.locale); | ||
const { publicRuntimeConfig } = getConfig(); | ||
|
||
// analytics.identify( |
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.
remove comments
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.
fixed
userId: publicRuntimeConfig.segmentUserId, | ||
event: 'Starter Project Downloaded', | ||
properties: { | ||
analytics.track( |
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.
we can do this later, but probably a good idea to track after the call to await download(project);
has finished. If there is an exception in the download function and a user spam clicks download, this will just spam analytics to thinking a user really clicked on this project download many times 🤔
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.
just a small minor suggestion which can be thought about for 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.
I can believe I keep forgetting to review this 🤦♂️
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnmcollier, kim-tsao, maysunfaisal, schultzp2020 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do / why we need it:
Adds anonymous Id to segment
Fixes devfile/api#678
Fixes devfile/api#651