Home Organic
Growth
Master
Planning
SEOMike
Portfolio
Professional
Background
Personal
Background
SEOMike
Blog
SEO
Services
 

Archive for the ‘Analytics’ Category

Google Analytics Asynchronous Tracking Code

Friday, June 11th, 2010

Late last year Google introduced a new asynchronous tracking code for their analytics platform.  The new code is a much-needed change to their system.  The old code on sites was located just before the close-body tag at the end of the HTML.  On big sites you would see the page load and then if you watched your browser’s status code you would see the page waiting for Google’s response to the tracking code.  The new code is placed just before the close-head tag so it is loaded first and Google responds while the page is being rendered effectively decreasing the overall page-load time since the tracking info is loaded out of sync.  Asynchronous means just that, the code can load OUT OF SYNC with it’s position in the HTML so nothing that follows it has to wait for it’s completion.  The new code is available through your existing analytics account and I recommend that you replace the old tracking code with the new one.

I have a client that needs to run analytics using two accounts on the same website.  There are many reasons for this kind of implementation, but the most common reason is to setup tracking for multiple third-party marketing firms so each can define their own filters, conversion goals, user funnels, etc.  Unfortunately, the implementation of the additional account ID on my client’s site was not correct and it “broke” analytics for the other account.  One account had good data, the other account couldn’t keep track of the users.  This is because the way the code was written, one tracking cookie was being overwritten by the other, and the one associated with the account being overwritten was reading 99% bounce rate, 0.00 time on page, and could not follow users into the site.

Since some of the posts discussing this topic online are a bit technical, I thought I would post an easy-to-understand version here.  I’ve placed the correct code below with examples of how you add additional account ids to a website without breaking the analytics.

Using Multiple Accounts With Asynchronous Tracking

Using Multiple Accounts With Asynchronous Tracking

You can see in the image that I’ve input multiple account ids. (UA-XXXXXXXX-X)  Each new id starts with a new letter (b._, c._) and you can continue this for as many analytics accounts that you want to hook up to your site.  Remember, the more accounts you connect, the slower the pages will load so I suggest keeping the number of accounts to a minimum.

SEOMike.com v.2 – Coming Soon!

Tuesday, January 22nd, 2008

I took a peek at my analytics today and noticed that the site has brought some interesting visitors from around the world. People have come from: India, Algeria, Russia, Brazil, The UK, Ireland, And, of course, the US. Thanks for the visits! Keep coming back!

SEOMike.com v.2 is coming soon! I’ve got a friend designing an actual logo and a layout for the site that won’t be 100% lame like it is now. There are some fun things planned for the next version of the website. I’d like this to become a resource for information but I’m not going to reinvent the wheel, I’ll just put up information I find that I think is trustworthy and valuable. Sifting through the net-noise to find little kernels of truth can be very difficult, especially in the SEO world. Maybe you’ll find the site helpful, maybe not. If not, I’ll put up a contact method to take suggestions on how to make the site better.

Google Analytics Between Two URLs

Friday, January 4th, 2008

Happy New Year! We made it, and I can’t believe the Jayhawks won the Orange Bowl!
Been working a lot lately trying to pass Google Analytics cookie data between URLs and have now got it figured out. We have to pass the info between URLs because we need a central secure place to process user data. Anyway, for posterity here’s what works:

_utmLinker that functions with an image link:

<script type=”text/javascript”>
document.write(’<a href=”javascript:__utmLinker
(\’https://www.myurl.com’);”"rel=”nofollow”>
<img src=”images/button.gif” width=”139″
height=”29″ border=”0″ /></a>’);
</script>

<noscript>
<a href=”https://www.myurl.com” “rel=”nofollow”>
<img src=”images/button.gif” width=”139″ height=”29″
border=”0″ /></a>
</noscript>

_utmLinker that functions with a text link

<script type=”text/javascript”>
document.write(’<a href=”javascript:__utmLinker
(\’https://www.myurl.com’);”"rel=”nofollow”>Apply Now
</a>’);
</script>

<noscript>
<a href=”https://www.myurl.com”
“rel=”nofollow”>Apply Now</a>
</noscript>

Required modification to the GA Tracking Code

<script src=”http://www.google-analytics.com/urchin.js” type=”text/javascript”>
</script>
<script type=”text/javascript”>
_uacct=”UA-0000000-0″;
_udn=”none”;
_ulink=1;
urchinTracker();
</script>
<script>
if(typeof(urchinTracker)!=’function’)document.write
(’<sc’+'ript src=”‘+
‘http’+(document.location.protocol==’https:’?
’s://ssl’:'://www’)+
‘.google-analytics.com/urchin.js’+'”></sc’+'ript>’)
</script>

<script>
_uacct = ‘UA-0000000-0′;
urchinTracker(”/0260360448/test”);
</script>

Input the information into a hidden field so that a submit function on a form will pass the information off as well:

<form xid=”form” method=”post” onsubmit=”__utmLinkPost(this);”

… and that’s how you do that!