Help - Google Analytics question

by Don Schenk 5 replies
I'm new to Google Analytics (which will be obvious judging from my questions).

In signing up, I signed up one of my websites, and followed through to get the javascript.

Yes, I know how to install the script, but there appears to be two different scripts run together here.

In the box it looks like this...

<script type="text/javascript">
There are 2 lines of javascript here
followed by an end tag
<script type="text/javascript">
There are 2 more lines of javascript
here followed by another end tag

Then Google Analytics says, "Note: We recommend that you do not include both tracking code snippets together on any given page. Doing so might generate inaccurate report data. You can, however, migrate select pages of your site to the new tracking code while the legacy code remains on others."

Now I'm confused. Is each one of these a snippet? Do I use either one? Or both?

What does, "migrate select pages of your site to the new tracking code while the legacy code remains on others" mean?

Is one of these snippets an older, legacy code? Clear as strong coffee.

AAAArrrrrrggggghhhhhhh. Let's hear it for clear communication. :-)

Thanks folks.

#main internet marketing discussion forum #analytics #google #question
Avatar of Unregistered
  • Profile picture of the author Mike Bogowski
    Hi Don,

    When Google Analytics first started off they were using the code from the Urchin system (which was purchased by Google). Since then they have upgraded the system and use a different set of javascripts. So that old systems works they still allow the use of both sets of code.

    The 'legacy' code is the old Urchin code and obviously the other code is the newer code. In your Analytics account both these sets of code are separated by tabs in the browser, they will never appear on the same page at the same time, you need to press the tab to display either one.

    In your case, you have 2 sets of script tags... This is correct and you should paste all of that code into your page. The first set of script tags tell the browser to load the google javascript from a secure or non secure connection. This is so that your users dont see a warning message if loading your page using ssl (https).

    The second set of script tags is the javascript functions that need to run.

    So, in short you need that entire set of code but only use one of the tabs. That is what they mean when saying 'dont include both tracking code snippets'

    I hope I was able to clear this up a little for you and not add to the confusion

    Puppets are people too

    {{ DiscussionBoard.errors[158951].message }}
  • Profile picture of the author BrianMcLeod

    After G bought and took over Urchin, they changed some things and added some new features. Problem is, many many sites used that urchin code in some form or fashion. Some hard coded it into API's or theme code, etc.

    So, they still support it, but want everyone to migrate to the new javascript.

    I am exclusively using the new ga.js code on all of my sites.

    I would recommend you do the same.

    It's the one on the left in the "check status" page.


    {{ DiscussionBoard.errors[158956].message }}
    • Profile picture of the author KenJ
      Well thank you Brian

      Why can't google explain this for themselves

      Instead of mysteriously offering 2 choices from a list i have never heard of
      {{ DiscussionBoard.errors[158967].message }}
  • Profile picture of the author Don Schenk
    Thank you Mike and Brian.

    Yes Ken, Google's instructions were just ambiguous enough to put my brain on "tilt." And as Brian suggested, I went in and looked at the statis page. The code is there too.

    Thanks guys

    {{ DiscussionBoard.errors[159132].message }}
    • Profile picture of the author marksmatter
      You may also like to know that CAN run two of the new java snippets on the same page without any issues. I use one profile to display unfiltered results, and another heavily filtered profile to display the search terms that trigger adwords. Pretty handy setup.
      {{ DiscussionBoard.errors[159166].message }}
Avatar of Unregistered

Trending Topics