Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Squarespace: Track portfolio clicks to GA with the Avenue theme
// Google analytics
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('create', 'UA-937700-1', '');
ga('send', 'pageview');
Y.on('domready', function() {
// GA Track clicks on project thumbs
var onClick = function(e) {
var link = this.getAttribute('href');
ga('send', 'event', 'projectThumbs', 'click', link);
}'#projectThumbs').delegate('click', onClick, '.project');
Copy link

MrBlank commented Mar 24, 2014

Don't use Squarespace's Google Analytics code. Use Google's latest.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment