16 December, 2006

Adding a domain to Google Analytics

When you first sign up for Google Analytics, it takes to the are where you add your first domain. You also setup a profile. You can have different profiles for different domains, multiple domains in one profile, and one domain in multiple profiles.

I think this is originally designed to monitor specific advertising and keyword returns for your website. You can add filters (to filter out your own IPs while looking at your own site), and set goals and monitor ROI (Return On Investment). But I really don't use any of that stuff, heck, I barely understand 3/4 of it. The real kicker is being able to see where people are visiting, what they are visiting, when they are visiting and what keywords and referrers were used to get them to your site. In case you didn't know, a referrer is when they click a link on another site, and it leads to your site. For instance, if someone does a keyword search in Google and your site pops up, and they click the link to get to your site, then Google is the referrer.

Okay, back to the tutorial. If you already have one or more domains in your profile, you'll want to click on the "Add Website Profile" link found in the upper right hand corner of the "Web Profiles" section of the GA screen you see when you log into GA.



This takes you to another page where you select "Add a Profile for a new domain".

Then enter the URL of the domain, your country or territory and your timezone. Then click "Finish."

Now it gives you the code required for GA to find your site. It is JavaScript and looks someting like this:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1027491-8";
urchinTracker();
</script>


If you have a blogspot blog, you can edit the template (this is for the new beta blogs, I don't know about the old stuff because I don't use them...sorry). Add a new HTML/JavaScript element, put the code in that element (in HTML mode, not in RTF or 'Compose' mode), save it and VOILA! the code is now added to your site.

If you host your own site, put the script between the head tags of the default page (or on a module that is displayed on all pages). The domain that I registered here is really just parked, it is forwarded to my family domain, so I put this in the head tag just before I tell the browser to redirect to the other site.

You might see that it says "Tracking Unknown - Check Status" in the right hand column of the the row containing the domain you just added. Click the "Check Status" link. It should tell you the code was found. When you click "Done" again, the grid should show "Waiting for Data" instead of "Tracking Unknown".

I do have one site, My Home Town that does not seem to be found ever. I have added the code several times, but to no avail. I am going to delete it from GA in the next couple of days, and re-add it to see if that helps. It's a blogspot site so it should be found (blogspot is owned by Google).

No comments: