Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Hammer 41 posts 67 karma points
    Jun 04, 2014 @ 11:38
    David Hammer
    0

    Where do I put Google Analytics in Umbraco?

    Hi,

    I've put the tracking code within my head tags in my Main Template, but it doesn't seem to be registering visits. Should I place it elsewhere?

    Thanks up front :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 04, 2014 @ 16:01
    Jan Skovgaard
    0

    Hi David

    Where and how you place your GA tracking code does really not have anything to do with Umbraco since it needs to be placed in your markup.

    But to me it sounds like you've placed it the right place - Yes yes I know that some people will probably tell you to add it just before for performance reasons - But I read in an issue of .net magazine 6 months ago or something that it's advisable to add in since placing it before can lead to improper tracking.

    But is there a live site where we can see it? And have you checked that the reason it does not seem to work is not that there are other javascript error on the site that could influence it or something like that?

    /Jan

  • David Hammer 41 posts 67 karma points
    Jun 04, 2014 @ 22:00
    David Hammer
    0

    Hi Jan,

    Thanks for the response.

    The site is live and can be seen here: www.notat.dk

    The console doesn't seem to be giving me any errors with the code. But I could be wrong.

    It still doesn't work though :/ I've tried placing it in other places.. and researching google analytics to see if I should set up the code differently.

    But it seems to me that, when it spits out a tracking code the google code should be fine?

    Anything would help at this point.. thanks again!

    /David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 04, 2014 @ 22:15
    Jan Skovgaard
    0

    Hi David

    Just had a quick glance at the source code and the placement etc. seems to be fine.

    However it's possible to install an extension to Chrome called "Tag assistant", which can tell you if there is a problem with your implementation. Get it here https://chrome.google.com/webstore/search-extensions/google%20analytics?hl=en

    I've just tested in my browser using it and it tells me that the tracking code is working - So you should be fine. Perhaps it can take a while before it appears as installed in the google analytics administration. Not sure why though. But according to this https://support.google.com/analytics/answer/1009683 it could take up to 24 hours before any data is visible.

    You should also checkout the extension "Google analytics debugger", which makes it possible to test if events etc. are tracked properly https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna/related?hl=en

    Hope this helps.

    /Jan

  • Bojana 4 posts 73 karma points
    Nov 29, 2019 @ 13:18
    Bojana
    0

    Hi i have a problem everything fine but its not redirecting me for login.I cant login to google so i can test the plugin.Can you please check and fix the issue?

Please Sign in or register to post replies

Write your reply to:

Draft