Making Downloads Trackable (see #1141)#1148
Merged
Merged
Conversation
All - I updated the long form case studies and the 2016 survey report to make it so I can track on Google Analytics. Let me know if this looks good or what changes I need to make here.
Updated version of PR #1141, adds a global JS helper: Links with the attribute `data-casestudy` will be tracked automatically, using the value of the data attribute as title in Google Analytics.
lpinca
reviewed
Feb 22, 2017
| s=o.getElementsByTagName(e)[0];j.async=1;j.src='//www.google-analytics.com/analytics.js'; | ||
| s.parentNode.insertBefore(j,s)}(window,document,'ga','script'); | ||
|
|
||
| if (!ga) return; |
Member
There was a problem hiding this comment.
Isn't this redundant? The above IIFE should always add the global ga no?
Contributor
Author
There was a problem hiding this comment.
If you use an ad-blocker, the GA script will not be loaded and thus the ga object doesn't exist.
lpinca
reviewed
Feb 22, 2017
| * [Read the full announcement.](/en/blog/announcements/nodejs-foundation-survey/) | ||
| * [See the infographic.](/static/documents/2016-survey-infographic.png) | ||
| * [Read the full report.](/static/documents/2016-survey-report.pdf) | ||
| * <a href="/static/documents/2016-survey-report.pdf" data-casestudy="Node.js 2016 Report">Read the full report.</a> |
Contributor
Author
There was a problem hiding this comment.
It was treated that way in the original PR. ¯_(ツ)_/¯
lpinca
approved these changes
Feb 22, 2017
Member
Contributor
|
This is great, thanks for cleaning this up 👍 |
Member
|
Ops, that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

See #1141 for discussion.