WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Modify tracking code

[Resolved] Modify tracking code

  • martyfitz
    Member

    @martyfitz

    Where do I modify the Tracking code in Google Analytics Dashboard?

    I have made a change to analytics and it is asking for the following…

    To implement Display Advertising features for Universal Analytics, insert the bold line into your existing tracking code between the ‘create’ and ‘send’ commands, as seen in this example:

    <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-XXXXXX-XX’, ‘example.com’);
    ga(‘require’, ‘displayfeatures’);
    ga(‘send’, ‘pageview’);
    </script>

    https://wordpress.org/plugins/google-analytics-dashboard-for-wp/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Alin Marcu
    Participant

    @deconf

    Hi, you don’t have to modify the code, is supported by the plugin.

    Go to Google Analytics => Tracking Code and switch on the option called enable demographics and interests reports

    martyfitz
    Member

    @martyfitz

    Hi Alin,

    I enabled this switch in the Google analytics / Admin / Property settings page.

    I then went back to the Reporting / demographics / overview page and tried to validate.

    It does not validate and continues to ask me to validate after I have added the one line one time update to the tracking code.

    martyfitz
    Member

    @martyfitz

    It also shows this message on the overview page.

    Your Demographics and Interest Reports have been enabled, but your Analytics tracking code does not include the necessary support to show them. Learn more about the simple, one-line, one-time change to your tracking code to add this support.

    Plugin Author Alin Marcu
    Participant

    @deconf

    You need to have patience, that’s all! Other users already reported here and on my forum that the validation process takes some time (sometimes over 24h)

    martyfitz
    Member

    @martyfitz

    Hi Alin,

    It’s been 4 days now and the validate button is still not working.

    I have checked out the page source, does it look ok? in the correct place?

    <meta property=”og:title” content=”Home”/>
    <meta property=”og:site_name” content=”Specialist in Food & Garden Construction”/><!– <meta name=”NextGEN” version=”2.0.66″ /> –>

    <!– BEGIN GADWP Universal Tracking – http://deconf.com/google-analytics-dashboard-wordpress/ –>
    <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-51200444-1’, ‘foodgardener.com.au’);
    ga(‘require’, ‘displayfeatures’);
    ga(‘require’, ‘linkid’, ‘linkid.js’);
    ga(‘send’, ‘pageview’, {‘anonymizeIp’: true});
    </script>
    <!– END GADWP Universal Tracking –>

    I had set the switch in GA admin/property settings/advanced settings
    Does it seems strange it should take this long?

    Plugin Author Alin Marcu
    Participant

    @deconf

    Try the Skip Validation button.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Modify tracking code’ is closed to new replies.