Skip to content
This repository was archived by the owner on May 15, 2020. It is now read-only.

Conversation

@jodybrewster
Copy link
Contributor

Added ability to set user ID

Added ability to set user ID
}

return fetch(`https://www.google-analytics.com/collect?${hit.toQueryString()}&${this.customDimensions.toQueryString()}&z=${Math.round(Math.random() * 1e8)}`, options);
if (this.userId !== null && this.userId !== undefined) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like this could just be a falsy check, no? if (this.userId) { ? -- Also I'd probably prefer just uid as the variable name.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants