Foundation/Metrics/webmaker-ga-snippet

From MozillaWiki
Jump to: navigation, search

Webmaker GA Snippet

Use this on standalone pages hosted on a webmaker.org subdomain. E.g. Externally hosted landing pages. This goes before </head>

 <script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-35433268-12']);
 _gaq.push(['_setDomainName', 'webmaker.org']);
 _gaq.push(['_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>

Here is info on how to use this in Unbounce. http://support.unbounce.com/entries/513757-Can-I-use-custom-JavaScript-or-CSS-on-my-page-