Using The Asnyc Google Analytics Controls

Google has created a new way to make their google analytics tracking scripts load asynchronously which is now their recommended approach, though the old synchronous scripts are still supported.

To use the newer asynchronous scripts in mojoPortal content management system, we have 2 new controls:

<portal:AnalyticsAsyncTopScript id="analyticsTop" runat="server" />

which should be placed in your layout.master file just below the opening body tag


<portal:AnalyticsAsyncBottomScript ID="analyticsBottom" runat="server" />

which should be placed just before the closing body tag.

You should remove the older synchronous script control that  looks like this:

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

However, keep in mind that if you have setup a lot of custom tracking on links in your content using the old script, then you would have to find those and convert them to the newer async syntax. If you are not sure if you have any custom tracking in your content, it is perfectly reasonable to just continue using the synchronous tracking.

Monetize Your Site With Site Membership Pro!