Last active
July 19, 2016 18:40
-
-
Save kylewest/dfdf3e4deb2ef0b165c28c72f1ec3f9e to your computer and use it in GitHub Desktop.
fire google analytics event when user clicks add to cart
This file contains 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
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$(".addtocartbutton").click(function() { | |
// GA events.js code here | |
ga('send', 'event', 'Videos', 'play', 'Fall Campaign'); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment