Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support Steve M

    (@wpsmort)

    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.

    Thread Starter Jamie Thomson

    (@brandnewcopy)

    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.

    Plugin Support Steve M

    (@wpsmort)

    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.

    Thread Starter Jamie Thomson

    (@brandnewcopy)

    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.

    Plugin Support Steve M

    (@wpsmort)

    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.

    Thread Starter Jamie Thomson

    (@brandnewcopy)

    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.

    Plugin Support Steve M

    (@wpsmort)

    Hi Jamie,

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

    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

    Plugin Support Steve M

    (@wpsmort)

    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)

    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

    Plugin Support Steve M

    (@wpsmort)

    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.

    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

    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

    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.

    Make sure you visit your site with a different browser. Or log out of WordPress and view your site’s source code. You’ll see the Google Analytics script in the header.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Google Analytics not Working’ is closed to new replies.