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

Only make GOV.UK analytics call when GA is ready #404

Merged
merged 1 commit into from
May 3, 2017

Conversation

boffbowsh
Copy link
Contributor

We want to send the gaClientId with our GOV.UK analytics payload, but
due to asynchronous loading we may not have actually fetched it from
the GA library by the time sendToTracker is called.

If GA is enabled on this page, we now wrap the call to sendData in
the “ga ready” callback function and make sure we set the clientId
first.

We want to send the `gaClientId` with our GOV.UK analytics payload, but
due to asynchronous loading we may not have actually fetched it from
the GA library by the time `sendToTracker` is called.

If GA is enabled on this page, we now wrap the call to `sendData` in
the “ga ready” callback function and make sure we set the clientId
first.
@boffbowsh boffbowsh merged commit 0a797cf into master May 3, 2017
@boffbowsh boffbowsh deleted the set-client-id-asynchronously branch May 3, 2017 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants