Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use the new Google Analytics tracking code (Universal Analytics) #758

Closed
wants to merge 1 commit into from

Conversation

cabgfx
Copy link
Contributor

@cabgfx cabgfx commented May 12, 2013

Google recently deployed their new tracking code as a public beta, and recommend new installations use this:

The analytics.js snippet is part of Universal Analytics, which is currently in public beta. New users should use analytics.js. […] To begin tracking a website using analytics.js, paste the following JavaScript snippet into your website template page so that it appears before the closing tag.

I've updated lib/scripts.php to

  1. Use this new script, and
  2. Output to wp_head() instead of wp_footer() as suggested by Google.

I should state up front that I only have basic experience with the new tracking code. I just figured that Roots developers might benefit from the added flexibility, and that Roots itself should be up to date with any vendored plugins/scripts.

What's your opinion?

This replaces the former ga.js file used for Google Analytics tracking.
[More info in the GA docs](https://developers.google.com/analytics/devguides/collection/analyticsjs/)
@retlehs
Copy link
Member

retlehs commented May 13, 2013

thanks for the PR. i like it, but i've been waiting for h5bp/html5-boilerplate#1347 to get merged before we do the same

@cabgfx
Copy link
Contributor Author

cabgfx commented May 13, 2013

Right, that makes sense.
Let's just wait for the H5BP guys – they've undoubtedly spent more time on it than I have.

@retlehs
Copy link
Member

retlehs commented Jun 3, 2013

looks like h5bp/html5-boilerplate#1369 is going to be the code to use

@mathiasbynens
Copy link

FWIW, h5bp/html5-boilerplate#1369 is now merged. :)

@cabgfx
Copy link
Contributor Author

cabgfx commented Jun 3, 2013

👍

On 03/06/2013, at 19.31, Mathias Bynens notifications@github.com wrote:

FWIW, h5bp/html5-boilerplate#1369https://github.com/h5bp/html5-boilerplate/issues/1369is
now merged. :)


Reply to this email directly or view it on
GitHubhttps://github.com//pull/758#issuecomment-18857147
.

@retlehs retlehs closed this in 66ac187 Jun 3, 2013
@retlehs
Copy link
Member

retlehs commented Jun 4, 2013

thx @mathiasbynens, you're amazing. 💙

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants