Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8419653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:40:24+00:00 2026-06-10T02:40:24+00:00

We have an older site which still uses the ancient gat Analytics tracking code

  • 0

We have an older site which still uses the ancient “gat” Analytics tracking code (pre asynchronous); we would like to upgrade it to the current “gaq” asynchronous code.

If anyone has done the same switch, a couple questions …

1) Once we make the switch, will the user cookies carry over from the old code? Or will Analytics now “forget” visitors that have already visited our site and consider everyone that gets the updated asynchronous code snippet a brand new visitor?

2) The site is pretty complex; we’ll probably have to “hunt” for all the sections of the site that have the old tracking code on them. While we do this code cleanup, will the old “gat” code and the new “gaq” code be compatible? Meaning they’ll both count pageviews properly, will not lose referrer info, and count just one visit even if the user hits both pages containing the old code and those containing the new code during their visit?

Thanks! And just for reference, here’s our current (old) code:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-#######-#");
pageTracker._trackPageview();
} catch(err) {}</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:40:26+00:00Added an answer on June 10, 2026 at 2:40 am

    If your implementation is as simple as tracking the pageviews — or another way, if you aren’t heavily using deprecated GA methods, to do custom-tracking of user-actions, or browser-features or whatever else, then here are your answers:

    1. GA will remember the visitors.
      The reasoning behind this is simple: the code you have on the page isn’t what GA uses to track people — the .js file that they call in the document.write(); portion of the script is what they use to track people and set cookies and all of the rest.
      They have updated that file dozens of times, without you noticing, because of how they’ve separated their logic (in that file), from the tracking-interface that you use (which has stayed the same all that time).

    2. There won’t be any problems with having some pages on the old code (again, as long as you aren’t doing any advanced tracking from page to page, based on very-new or very-old features that are more advanced than tracking custom variables, tracking purchases and tracking pageviews).
      The one stipulation here is that you DO NOT LEAVE THEM BOTH ON THE SAME PAGE.
      That would result in both firing, and both collecting the same data, and you’d basically be doubling your metrics.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an older web application that uses a MySQL Database (MYISAM). I noticed
I have some older (broken) code that has a join using a *= table1.ID
I have some older code that doesn't appear to work on 64bit Windows 7.
We have a Sharepoint WSS wiki site from which one of the users accidentally
I have following code on my site: backgroundImages[bg_img_path_b]=new Image(); backgroundImages[bg_img_path_b].src = bg_img_path_b; backgroundImages[bg_img_path_b].loaded=loading; //jQuery(backgroundImages[lastImage]).unbind('load.backgroundImages');
I have just launched a site (using Joomla and a custom template), which doesn't
I would like to have the authentication and registration parts of my website encrypted
I have a site, which upon clicking an image a lightbox pops up (eg
Hi I have a long series of urls of images (eg. site.com/pic.jpg ) which
I have a little site that's available in different languages which are selected based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.