WordPress.org

Ready to get started?Download WordPress

Forums

All in One SEO Pack
Google Analytics not Working (15 posts)

  1. Jamie Thomson
    Member
    Posted 9 months ago #

    Hi there.

    I was wondering if anyone could help me?

    I've added my analytics tracking ID to the relevant field, entered my homepage URL and selected 'universal analytics' but my analytics account isn't tracking anything yet. I set this up over a week ago.

    Any ideas?

    Regards,

    Jamie

    http://wordpress.org/plugins/all-in-one-seo-pack/

  2. wpsmort
    Member
    Posted 9 months ago #

    Hi Jamie,

    Does the code that All in One SEO Pack is outputting for Google Analytics in your website source code exactly match the code from your Google Analytics account? It must exactly match.

  3. Jamie Thomson
    Member
    Posted 9 months ago #

    Hi wpsmort.

    Thanks for your reply.

    How would I check this?

    I haven't inputed any code myself other than adding the tracking ID to the field in the plugin.

    Jamie.

  4. wpsmort
    Member
    Posted 9 months ago #

    Hi Jamie,

    To check the code on your site view the source code of your site in a browser and look for the All in One SEO Pack by Michael Torbert line. Under that line you'll see your Google Analytics code.

    To check the code in Google Analytics go to Admin, Tracking Info, Tracking Code.

  5. Jamie Thomson
    Member
    Posted 9 months ago #

    Thanks wpsmort.

    I've checked the tracking ID's on my source code and analytics account and they both match.

    My analytics account shows 'status: tracking installed' and also says:

    'To get all the benefits of Universal Analytics for this property, copy and paste this code into every webpage you want to track.'

    Do I need to paste the code that I've been given into every page of my site? Would I do this using a text widget?

    Regards,

    Jamie.

  6. wpsmort
    Member
    Posted 9 months ago #

    Hi Jamie,

    No you don't need to paste any code anywhere. As long as you entered your Google Analytics UA number into All in One SEO Pack or used the Connect button then the plugin does the rest.

    You should check that the Google Analytics code matches exactly, go through each line and compare what is on Google Analytics and what is in your source code.

  7. Jamie Thomson
    Member
    Posted 8 months ago #

    Hi wpsmort. Thanks again for your help.

    I checked both codes and they are different.

    Should I change the source code on my website to match the tracking code on my analytics account?

    Jamie.

  8. wpsmort
    Member
    Posted 8 months ago #

    Hi Jamie,

    Can you tell me what the difference is? Can you paste the lines that are different in here so I can see?

  9. webly
    Member
    Posted 7 months ago #

    im having the same problem. this is the (redacted) code snippet google has provided:

    <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-6666666-6', 'website.com');
      ga('send', 'pageview');
    
    </script>

    and this is the code being generated on the site by the plugin:

    <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-666666-6');
       ga('send', 'pageview');
    </script>

    as you can see the third to last line is different. Ive tried adding the site domain under the "Tracking Domain" settings however that generates that line as follows:

    ga('create', 'UA-666666-6', { 'cookieDomain': 'website.com' } );

    which is still different to the google provided code.
    how do I fix this?

    Cheers,

    Joe

  10. wpsmort
    Member
    Posted 7 months ago #

    Hi webly,

    You've configured domain tracking in All in One SEO Pack which is why that additional line is showing. Remove the domain name from the Tracking Domain field and the problem will be resolved. Unless of course you want domain tracking in which case configure it in your GA account (https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite)

  11. webly
    Member
    Posted 7 months ago #

    thanks for the quick reply!

    I havent actually configured domain tracking, though I did try that to see if it would provide the domain in the first snippet of code that google provided, but it didnt as you can see in the third example i provided.

    so if you compare the first example - which is the code google gave me - with the second example - the code the AIOSEO plugin generates - you can see the only difference is on the third to last line, where the domain name is not included.

    Cheers
    joe

  12. wpsmort
    Member
    Posted 7 months ago #

    Hi webly,

    Enter the same domain in the Tracking Domain field in All in One SEO Pack and you'll see that your code will match what you have on Google Analytics. If you don't want to use that option then make the relevant change in your GA account.

  13. webly
    Member
    Posted 7 months ago #

    thanks again but I dont think youre reading what im saying! i already tried that, and pasted the results in the first post I made. It still doesn't match. The AIOSEO plugin generates a line of code like this:

    ga('create', 'UA-666666-6', { 'cookieDomain': 'website.com' } );

    where the google generated code looks like this:

    ga('create', 'UA-6666666-6', 'website.com');

    Either way, Ive got it sorted by using the Yoast plugin instead. I appreciate your attempt to help, I felt like I had explained it well but I guess maybe I didnt!
    Cheers,

    Joe

  14. BryanSmithBend
    Member
    Posted 5 months ago #

    Hello: I am using the all in one SEO pack, and have entered my tracking code, and all looks well plugin wise, however I cannot see any code actually appearing in my page view. I have done searches for it and looked in the header and footer files, and header and footer in the page view and inside the All in One SEO pack lines: where I do see the google and bing verification codes.

    I am trying to use the asynchronous, type of tracking, perhaps that is the difficulty? The plugin website recommends the standard tracking.

    http://skylighthomebuilders.com

  15. BryanSmithBend
    Member
    Posted 5 months ago #

    I gave up trying to get all in one seo to place the tracking code and added the yoast google tracking plugin to my site, and that works fine.

Reply

You must log in to post.

About this Plugin

About this Topic