WordPress.org

Ready to get started?Download WordPress

Forums

All in One SEO Pack
[resolved] Support for demographics in GA (21 posts)

  1. randler
    Member
    Posted 10 months ago #

    I get this information when trying to see demographics in Google analytics. I'm using classic analytics.

    "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."

    In the following link there is instructions to change a line in the analytics code, and since we're using your plugin it's not really an option. Is this something you are planning to solve in a future version or do you have any good solutions for me?

    https://support.google.com/analytics/answer/2444872?hl=en-GB&utm_id=ad

    Michael

    http://wordpress.org/plugins/all-in-one-seo-pack/

  2. Peter Baylies
    Member
    Plugin Author

    Posted 10 months ago #

    randler,

    Thanks for bringing this to our attention; actually, it is sometimes possible to customize well-written plugins with just a bit of extra code. So while we figure out whether, when, and where we'd want to add a feature like this, you can add this code to the functions.php of your theme or to a plugin, and have this solved today:

    function randler_display_advertising( $analytics ) {
    	return str_replace( "'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';", "'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';", $analytics );
    }
    add_filter( 'aiosp_google_analytics', 'randler_display_advertising' );
  3. abinashm
    Member
    Posted 10 months ago #

    Hi @peter,

    Thanks for the suggestion as I am also facing the same problem.
    1. Does it really work If you put this code under the functions.php child theme?
    2. Anything else do I have to verify with google analytics site after putting and updating these codes?

    Let me know

  4. Peter Baylies
    Member
    Plugin Author

    Posted 10 months ago #

    abinashm,

    1. Yes, this code should really work if you put it in the functions.php of your theme, child or otherwise.
    2. This doesn't do verification; there's a section for that in the settings under "Webmaster Verification". For Google Analytics, you don't need to verify, just make sure you have your UA number entered in properly.

  5. abinashm
    Member
    Posted 10 months ago #

    Thanks Peter,

    Let me try and I will let you know if that works :)

  6. Julian Magnone
    Member
    Posted 9 months ago #

    Hi,

    I am also trying to make the demographic features work with AIOS plugin but I couldn't yet. I added the snippet above in my functions.php but can't see the changes in the GA code. Is the filter name correct?

    Thanks.
    Julian

  7. Peter Baylies
    Member
    Plugin Author

    Posted 9 months ago #

    Julian,

    It should be; what exactly are you trying to do?

  8. numero7
    Member
    Posted 8 months ago #

    awesome thanks...

  9. Allexis
    Member
    Posted 7 months ago #

    Thanks for bringing this to our attention; actually, it is sometimes possible to customize well-written plugins with just a bit of extra code. So while we figure out whether, when, and where we'd want to add a feature like this, you can add this code to the functions.php of your theme or to a plugin, and have this solved today:

    ___ i did put the codes into the functions.php and check my analytics . I can still see this problem .
    Though i put the code on the functions.php , it won't still track/see the demographics . What will be the function of your given code ? Im confused a little

  10. Peter Baylies
    Member
    Plugin Author

    Posted 7 months ago #

    Hi Allexis,

    Please start a new thread for your issue; also, this patch is now obsolete, so just make sure you have the latest version of the plugin, it already has code for this built in (enable the "Display Advertising" Tracking option).

  11. thelawstudentswife
    Member
    Posted 6 months ago #

    Hi! PLEASE HELP!
    I have updated to the most recent version of the plug in AND enabled demographic data, but Google still gives me the error message, "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."

    Can you help??

  12. wpsmort
    Member
    Posted 6 months ago #

    Hi thelawstudentswife,

    You will need to compare the Google Analytics code inserted by All in One SEO Pack with the Google Analytics code provided by Google. Compare the code line by line and look for any differences. Let us know what those differences are.

  13. thelawstudentswife
    Member
    Posted 6 months ago #

    Hi! I understand that these are the instructions from Google. However, I am unable to locate where the plug in put the Google analytics code in my site. I searched through everything theme file, and cannot find it. I put my analytics ID into the plug in setting page, but that is the only place where I can find any GA info.

  14. wpsmort
    Member
    Posted 6 months ago #

    It puts it in the source code of the site which you can view in your browser.

  15. thelawstudentswife
    Member
    Posted 6 months ago #

    I'm sorry but I do not understand WHERE the code is. Is it in a theme file? The plug in editor? I cannot find where in my theme files the code is inserted. I even called my host, and they could not locate it either. In what file do I find the code???
    I'm not trying to be difficult--I've just spent an hour trying to resolve this with no luck and really appreciate your help!

  16. wpsmort
    Member
    Posted 6 months ago #

    It's not in any file, you have to look at the source code of your website in your browser and you will see the code under where it says All in One SEO Pack.

  17. thelawstudentswife
    Member
    Posted 6 months ago #

    Thanks! I guess I am just unclear how to you the source code. Where do I need to look? In my theme? In my root directory? Can you provide me any direction?

  18. thelawstudentswife
    Member
    Posted 6 months ago #

    Sorry, I meant to say how to find the source code.

  19. wpsmort
    Member
    Posted 6 months ago #

    That will depend on what browser you are using. For example, in Chrome you right click on the page and select View Page Source.

    Again, I repeat, this has nothing to do with any file in any directory or theme, it the source code of your website as viewed in a browser.

  20. thelawstudentswife
    Member
    Posted 6 months ago #

    Hi! I can now view the source code in the browser, but I am wondering if the Google Analytics code is also in one of the plug in files. From what specific file does the source code of the website pull the GA information? It must be created from somewhere within the website, right?

  21. wpsmort
    Member
    Posted 6 months ago #

    No, it's added to the source code by All in One SEO Pack. It's not stored in any file.

Reply

You must log in to post.

About this Plugin

About this Topic