Google tracking

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
1/20/2010 10:59:51 AM
Gravatar
Total Posts 31

Google tracking

Hi. I have a client who wants to add Google analytics code to the site. If I use the feature in Mojo, I get a slightly different script compared to the one they would like as below. The main difference is the ._setDomainName bit. Any ideas?

<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">
try {
var pageTracker = _gat._getTracker("UA-XXXXXX-XX");
pageTracker._setDomainName("domainname.com");
pageTracker._trackPageview();
} catch(err) {}</script>

1/20/2010 11:26:35 AM
Gravatar
Total Posts 18439

Re: Google tracking

Hi,

You could remove this from layout.master file of your skin and add your custom code in it's place.

<portal:mojoGoogleAnalyticsScript ID="mojoGoogleAnalyticsScript1" runat="server" />

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.