Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #206264

    Hi there,
    I just included the Google Analytics tracking code via Enfold options. I can find the tracking code in the sourcecode of the website (www.sfta.at) but Google does not find it. Tracking is not installed.
    I use Universal Analytics and the code should be included right after the closing head-tag. But it is in the footer. What can I do to make the tracking work with enfold?
    Thanks!

    #206370

    Hi maaz022!

    The tracking code can be anywhere on the page. The footer is better in most cases since it shortens the initial load of the page (even if by a minuscule amount) and your visitors are then only tracked if the full page is loaded.

    It could take some time for your stats to show up in google but as long as you put your information in correctly the filed just returns exactly what you put into the source. So if you see it correctly there isn’t any other step we could direct you to take.

    Regards,
    Devin

    #206749

    Hi Devin,
    unfortunately it’s still not working. Can you please check the source code of http://www.sfta.at? Maybe you can find something?
    Thanks!

    #206844

    No, it doesn’t look correct. It should be this whole thing but with your UA number:

    <script type="text/javascript">
    
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-8163034-3']);
      _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>

    You need to go to google analytics>access analytics>click Admin in the top right>select your domain in the middle column and then click on the “.js Tracking Info” to get access to the screen where you copy the google analytics code that you then paste into the theme options.

    #206846

    The used Code is the new Google Universal Analytics Code. This is what Google tells me to include:

    <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-11528633-20’, ‘sfta.at’);
    ga(‘send’, ‘pageview’);

    </script>

    Actually that’s exactly what I can find in the source code as well. Very strange!

    #206850

    Hi!

    Maybe try this plugin: http://wordpress.org/plugins/google-analytics-for-wordpress/ to include the tracking code. Personally I don’t know why google does not find the tracking code because I also noticed it at the end of the html document.

    Cheers!
    Peter

    #206868

    Im going nuts! I’m now using the All in One SEO Pack Plugin to include the code. I’m also using this plugin to do so on other websites without problems, but Google still cannot find the tracking code!

    Is it possible that the theme makes problems with the Universal Analytics Code?!

    #207012

    Hey!

    No I don’t think so – otherwise a lot of other theme users would report the same issue (and I’m not ware of similar bug reports yet). In addition your website loads the analytics.js file properly and there are no js errors on your website – this article https://support.google.com/analytics/answer/1032399?hl=en shows you how you can test it with Chrome. Did you try to switch to the default theme – does google detect the code with i.e. the TwentyThirteen theme?

    Cheers!
    Peter

    #207313

    Actually I didn’t do anything and it’s working now. After 4 Days! Strange… Thanks for your support!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Google Tracking does not work’ is closed to new replies.