Created
May 24, 2012 18:12
-
-
Save chrisking/2783206 to your computer and use it in GitHub Desktop.
JS for client
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
| <script type="text/javascript"> | |
| var _gaq = _gaq || []; | |
| _gaq.push(['_setAccount','UA-3002088-4']); | |
| _gaq.push(['_setAllowLinker',true],['_setDomainName','www.nextgengovt.com'],['_trackPageview']); | |
| (function() { | |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
| })(); | |
| </script> | |
| <script type="text/javascript"> | |
| //Find all examples and iterate through the links to correct GA functionality | |
| $('a[href$="http://nextgengovt.eventbrite.com"]').each(function(){ | |
| $(this).click(function(){ | |
| _gaq.push(['_link', 'http://nextgengovt.eventbrite.com/']); | |
| if ((document.referrer).search("google")){ | |
| _gaq.push(['_setCampNameKey', 'google.com']); | |
| } | |
| return false; | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment