Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo

Ga - Very Odd Problem - Why Two Sets On Code In One Account?


  • Please log in to reply
4 replies to this topic

#1 lister

lister

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 405 posts

Posted 08 June 2013 - 10:26 AM

OK - I have two sites - two different domains on two different hosting accounts.

I have a GAnalytics account which works great.

I added a new site and when I look at the tracking javascript it is firstly completely different and secondly it says that it isnt tracking the site at all (despite 24 hours having passed)...

 

Here is the working javascript for the site that is being tracking successfully:

 

                    <script type="text/javascript">
                    
                      var _gaq = _gaq || [];
                      _gaq.push(['_setAccount', 'UA-111111111-1']);
                      _gaq.push(['_trackPageview']);
                    
                      (function() {
                        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                      })();
                    
                    </script>

 

The above is very standard and works 100% well...

 

The second site that I tried to add on the same GA account has this:

 

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-31111103-2', 'xxxx.com');
  ga('send', 'pageview');

</script>

 

It not only looks different but doesnt actually seem to work.

Can anyone get a sense of what it is that I have done wrong here? Basically Im completely confused.

I thought it would be easy to simply add another site to my GA account?

 

THANKS!!

 

 



#2 Jill

Jill

    Recovering SEO

  • Admin
  • 32,862 posts

Posted 08 June 2013 - 01:21 PM

Go to your Google Analytics account and take the code that they give you. Where did you get that one?



#3 lister

lister

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 405 posts

Posted 10 June 2013 - 09:18 AM

Go to your Google Analytics account and take the code that they give you. Where did you get that one?

 

That's what I am saying. I think Im going nuts....

 

It might be that somehow I have accidentally linked two domains to share analytics?

 

Does anyone reading this have an idea what it is that I have done so wrong? All I am trying to do is just regular tracking code for another site within the same account??

 

Hopefully these screenshots will make it clearer: (THANKS for all replies)

 

1.png

 

And then the actual tracking code:

 

2.png



#4 Jill

Jill

    Recovering SEO

  • Admin
  • 32,862 posts

Posted 10 June 2013 - 09:31 AM

But what exactly is the problem? You have two separate profiles with two separate id numbers. Just use that code they gave you.

 

You're using the new Universal Analytics is all, so it looks different than the old code.



#5 lister

lister

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 405 posts

Posted 10 June 2013 - 09:42 AM

Right ill try that. I guess i dont like change! Thanks






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!