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

Track social media shares in Universal #1998

Merged
merged 1 commit into from Mar 2, 2015
Merged

Track social media shares in Universal #1998

merged 1 commit into from Mar 2, 2015

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Feb 26, 2015

Update to using GOVUK.analytics.trackShare method instead of using the Google Analytics API directly. This will send the social media event to both classic and universal.

See also:
alphagov/static#550

https://www.pivotaltracker.com/story/show/88174796

cc @benilovj

Update to using `trackShare` method on GOVUK.analytics. This sends the
social event to both classic and universal.

* Simplify tests to the minimum HTML fixture necessary
@edds
Copy link
Contributor

@edds edds commented Feb 26, 2015

Is it worth adding a GOVUK.analytics && GOVUK.analytics.trackShare before these calls? As the JavaScript is going to be loaded in different files there is a possibility that the page could load one but not the other.

@fofr
Copy link
Contributor Author

@fofr fofr commented Feb 26, 2015

If GOVUK.analytics.trackShare isn't present, and the user clicks a facebook or twitter link they will still be taken to the share page in a new window. Raising an error in this situation won't impede the user.

The error might be tracked, which might be useful in tracking down a larger issue. If the tracking is failing and users aren't affected, I'd rather not mask the error.

@edds
Copy link
Contributor

@edds edds commented Feb 26, 2015

They are great points. As long as the user can still do what they need to do 👍

@fofr fofr changed the title [DO NOT MERGE until static#550 is deployed] Track social media shares in Universal Track social media shares in Universal Mar 2, 2015
fofr added a commit that referenced this pull request Mar 2, 2015
Track social media shares in Universal
@fofr fofr merged commit e59732b into master Mar 2, 2015
1 check passed
1 check passed
default Build #5237 succeeded on Jenkins
Details
@fofr fofr deleted the universal-social branch Mar 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.