How to Recover Google Analytics Tracking Code

If you change your blog template, or accidentally delete your Google Analytics tracking code from your website's HTML, it can be difficult to find the tracking code within the Analytics program.

Have you hunted around looking for your Analytics code? We have!


There are times we need to know how to find the Analytics code for our blog or website that we created years ago. Here is how to locate the code in your Google account.

First, Sign in (login) to your Google account. Then follow the steps below.
  1. Click https://www.google.com/analytics/web/#home/
  2. Click Admin on the sidebar.
  3. Select the appropriate account in the first column, and then select the website (property) in the second column by clicking the dropdown arrow by the default (first alphabetically) website listed.
  4. In the second column, now click Tracking info listed below your property (website). Then, from the menu that drops down, click Tracking code.

Copy the code and paste it into your webpage immediately before the </body> tag

If you are using the newer asynchronous syntax code, Google recommends placing the code right before the closing </head> tag, AND after any other scripts your webpage, blog, or template might use. The main reason for placing it in the head section is because it increases the likelihood that the tracking beacon will be sent before the user leave the page. If this is important to you, and you don't mind moving all your scripts to the "head" section, go for it.

Cheers!

6 comments:

Anonymous said...

YES YES. I hunted and never saw it. Appreciate the info.

Anonymous said...

Perfect, such a time-saver. Thank you!

WonderWoman said...

Couldn't see the forest for the trees! Thanks.

Alex said...

Thanks a lot! I was becoming crazy...

:-)

Tutors in Calgary said...

Thanks for this post. I just deleted my analytics and was freaking out.

Anonymous said...

THANKS

Post a Comment