Brian's Blog

items I see across my tribes

Google Analytics for BE.N

January 25
by briancarter 25. January 2009 10:25

When you add a new profile in Google Analytics, it will give you a code snippet.  You can have Google Analytics track multiple domains under a single account.  Copy and paste the code segment into the admin/Pages/Settings.aspx -> Tracking script. You can find more details here

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
</script>

You'll need to update the "xxxx-x" in the sample above with your own Google Analytics account number. You can access your personalized tracking code in its entirety by following the instructions in Where can I find my tracking code?. For secure pages, please read How do I obtain tracking code for secure pages?

Categories: Development

Comments are closed

 Questions or Feedback, my contact information is located on my About page.


The opinions, thoughts, and comments made in these blog posts are solely my own (unless otherwise stated). They do not reflect the opinions, thoughts or practices of my employer, my universities, my family, or anyone else. Also, I retain the right to change my mind about anything I publish here without having to go back and edit posts that occurred in the past. 

These are my opinions, or just as likely, someone else's opinions that I leveraged for my own.