Skip to content

Fix JavaScript error related to case study tracking#1155

Merged
phillipj merged 1 commit into
nodejs:masterfrom
phillipj:fix-broken-ga-tracking
Feb 22, 2017
Merged

Fix JavaScript error related to case study tracking#1155
phillipj merged 1 commit into
nodejs:masterfrom
phillipj:fix-broken-ga-tracking

Conversation

@phillipj
Copy link
Copy Markdown
Member

For the tracking code just merged to work properly, we need to wrap it into an IIFE because of a return statement which is only valid inside a function. This is what's visible in the console on nodejs.org ATM:

screenshot1

That error prevents the case study tracking scripts from attaching its click listeners, resulting in the case study tracking not being invoked at all.

Refs #1148

@phillipj
Copy link
Copy Markdown
Member Author

Protip when looking at the diff, add ?w=1 to the URL excluding the noisy whitespace changes: https://github.com/nodejs/nodejs.org/pull/1155/files?w=1

@phillipj phillipj merged commit 703bacb into nodejs:master Feb 22, 2017
@phillipj phillipj deleted the fix-broken-ga-tracking branch February 22, 2017 21:55
@fhemberger
Copy link
Copy Markdown
Contributor

@phillipj Whoops, sorry for that and thanks for fixing!

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.

3 participants