WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Google Analytics For WordPress & Demographics and Interest Reports (5 posts)

  1. Geoffrey Hale
    Member
    Posted 6 months ago #

    I use your Google Analytics For WordPress plugin and would like to continue doing so, but I don't see a clean way of making the following small change to my tracking code (https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad) which is required for Demographics and Interest Reports at Google Analytics.

  2. hannamyluv
    Member
    Posted 5 months ago #

    I will second this. I am actually going to go in and modify the plugin myself for now. But as this is a simple universal swap, it would be nice to see in a future release.

    You just have to be able to swap this line:
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

    With this line:
    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';

  3. BushwackerBen
    Member
    Posted 5 months ago #

    A work around has been found, read it here

  4. Geoffrey Hale
    Member
    Posted 5 months ago #

    I have the same question. The line that should change is the ga.src=:

    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';

    Source:
    https://support.google.com/analytics/answer/2444872?hl=nl&utm_id=ad

    Credit: Mackaaij

  5. Ann Stokes
    Member
    Posted 4 months ago #

    Does anyone have a Google Analytics plugin that is up-to-date? This seems to be a matter of finding a plugin that is being actively maintained.

Reply

You must log in to post.

About this Topic