Questions? Call Us: +1 (800) 750 6878

Contact Us

Leave Us A Message Below

How to add the Google Analytics Tracking Code Snippet to Websites and Blogs?

Adding Google Analytics tracking to your website or blog is one of the first and easiest steps you can take to start getting more informed about the traffic running through your website. It’s quick, simple, free—as a matter of fact, there’s simply no excuse for NOT doing it!

So roll up your sleeves and get ready for some cyber grease.

Where Do I Find the Tracking Code?

In order to start tracking your pages, Google Analytics must first sneak a few lines of code that will direct the application to do so. And, because the fine folks at Google aren’t the sneaky type, they actually let you do it yourself.

Here’s how:

  1. Log in (or sign up) to Google Analytics.
  2. A custom code is generated specifically for each and every profile (website), so find the account that contains the profile you wish to start tracking in your Account Overview page and click ‘Edit’ in the Actions column.
  3. Click ‘Check Status’ at the top.
  4. Grab the code from the dialog box by using right-click -->copy or the keyboard shortcut Ctrl-C.

A video is worth a thousand pictures. Check out this Google video if you’re having any trouble.

Traditional vs. Asynchronous Snippet

Last year Google released an upgraded version of the tracking code snippet that enables Asynchronous tracking. In a nutshell, this means faster load times.

While today Google maintains support for both the Traditional and the Asynchronous snippets, if you’re just getting started with Google Analytics for the first time there’s really no reason you should backtrack, so just go ahead with the latest version.

If you’ve already got Google Analytics set up, Google warns that you must first remove the traditional snippet before adding the new one, and offers some more migrating advice.

How to Add Google Analytics to your Blog?

Blogs generally use a template. That’s good, because it means that you’ll only have to insert the code once and it will automatically be added to all the subsequent pages.

Assuming you’ve already copied your code and it’s waiting to get pasted, sail over to Blogger (check out this guide if you’re on Wordpress), find your template tab, and choose Edit HTML—a scary dialog box full of strange symbols will display. Don’t freak out though, you don’t have to understand any of it!

To add the latest Asynchronous snippet, find the </head> tag (a quick Ctrl-F search would do), and paste the code right above it. It’ll look something like this:

</script>

**Insert Asynchronous code snippet here**

</head>

<body>

<div class=" ">

<div class=" ">

<div class=" ">

Should you be determined (for some stubborn reason) to use the traditional snippet, scrawl all the way down to the bottom and find the </body> tag—paste the traditional snippet right below it, like so:

</div>< >

</div>< >

</body>

**Insert Traditional code snippet here**

</html>

How to Add Google Analytics to your Website?

Adding the Google Analytics code to your website is mostly the same as adding it to your blog, with the exception that you’ll have to add it manually to every page you wish to track. That is, unless you’re using a template. If you do, according to Google, you need only add it once to the file that contains your <head> section—just above the closing </head> tag, like in the first example above.

Verify Your Setup

Follow these simple steps to test the success of your little operation: Asynchronous or Traditional.

That’s that—time to quit slacking and start tracking!

Related Articles:

  1. What is Google Analytics, Who is it for, and How Can it Help?
  2. How to Use Phone Number and Call Tracking with Google Analytics Integration Video
  3. Know Your Leads: A Look at How Call Stats Can Help Improve Your Marketing Performance
  4. Beyond Lead Generation: The Importance of Nurturing New Leads
  5. 5 Tips to Help You Effectively Use Landing Pages to Generate More Qualified Leads

posted by Maty Grosman @ 5:51 PM