Support » Plugin: Google Analytics for WordPress by MonsterInsights » 'Demographics and Interest Reports' in Google Analytics

  • Resolved Scott Offord


    In order to get the Demographics (Age/Gender) and Interests (Affinity Categories) to work, Google Analytics is telling me that Tracking code changes are needed.

    GA says: “Your Analytics tracking code does not include the necessary support for the Demographics and Interest reports. Learn more about the simple, one-line, one-time change to your tracking code to add this support.”

    The instructions state that I should change this line from:

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';

    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + '';

    Does the Yoast GA for WordPress plugin support the new Demographics and Interests reports in Google Analytics?

    What should I do to allow this to work using your plugin?

    I’ve asked this question here too:

    Scott O.

Viewing 15 replies - 16 through 30 (of 60 total)
  • That good and fine, but if the plugin gets updated in the repository, it will write over your edits.

    I attempted this code and it breaks my site (loads a blank page)
    I have to remove the entire plug in and reinstall to resolve.
    What am I missing? I tried multiple times and audited the code line for line…

    Wonderful Wanderings


    Looks like we’ll have to contact Yoast directly.
    Or stop using the plugin:/


    Your fix worked perfectly for me, thanks.

    I got it validated everything running smoothly, this fix should do until next update.



    No didn’t quite work Google Analytics stopped recording visits!

    I prefer to wait for an official upgrade…

    I would be happy to wait if I knew supporting this was actually going to happen anytime soon. Does anybody know any details about this?

    Demographics and Interest Reports


    You have successfully enabled the Demographic Reports. While you can access them now, it may take up to 24 hours before there is data available in these reports.

    Did the changes as described by kale holdings. Waiting to see if there is any data, after GA updates….

    Hey guys, just noticed on the YOAST website the following post:
    confirming that in order to make it work for the moment, we can enable the “Go to Host ‘ga.js locally” and add the URL

    seems to be working so far, at least it got validated and it’s not breaking my site, just waiting tomorrow for real data.


    @ tech_primosu
    Thank you, will check your post

    Tried the hint with ga.js locally but analytics still don’t accept analytics code for demographic reports.

    Interesting, and the Analytics’ source code is updated correctly, but the Analytics official website rejects to validate this. I compared the example provided by Google and the resulting code in my pages and it matchs every command. Don’t know what the hell is wrong with Analytics website.
    Anybody else with similar issue?

    Same here!!! Looks like there is something Analytics doesn’t like.

    The URL didn’t validate at my site either.

    It’s very strange, since the code looks like how Google wants it to be.
    The only thing not included by google is the CDATA expressions, but it shouldn’t be affecting the Analytics’ code…

    Any ideas?

Viewing 15 replies - 16 through 30 (of 60 total)
  • The topic ‘'Demographics and Interest Reports' in Google Analytics’ is closed to new replies.