WordPress.org

Ready to get started?Download WordPress

Forums

Google Content Experiments
Google doesn't see the code (4 posts)

  1. speedmatters
    Member
    Posted 1 year ago #

    Hi,

    When I try to validate the original page Google says the code isn't there but it is if you check the source code.

    Can you tell what I'm doing wrong here?

    The original page is:
    http://speedmatters.nl/prijsaanvragen/

    Thanks for the help so far,
    Amro

    http://wordpress.org/extend/plugins/google-content-experiments/

  2. glennm
    Member
    Plugin Author

    Posted 1 year ago #

    Maybe remove the following parts from the experiment code since I guess they should not be there (although they are comments):

    /*<![CDATA[*/
    and
    /*]]>*/

  3. speedmatters
    Member
    Posted 1 year ago #

    Hi,

    I guess this is an error inside your plugin since if I copy the code I added to your experiments code entering section it is exactly this:

    <!-- Google Analytics Content Experiment code -->
    <script>function utmx_section(){}function utmx(){}(function(){var
    k='56769868-11',d=document,l=d.location,c=d.cookie;
    if(l.search.indexOf('utm_expid='+k)>0)return;
    function f(n){if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.
    indexOf(';',i);return escape(c.substring(i+n.length+1,j<0?c.
    length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;d.write(
    '<sc'+'ript src="'+'http'+(l.protocol=='https:'?'s://ssl':
    '://www')+'.google-analytics.com/ga_exp.js?'+'utmxkey='+k+
    '&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='+new Date().
    valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
    '" type="text/javascript" charset="utf-8"><\/sc'+'ript>')})();
    </script><script>utmx('url','A/B');</script>
    <!-- End of Google Analytics Content Experiment code -->

    When I look at the source code of the page I also see the comment code you mentioned but I don't know how to remove that.

    Regards,
    Amro

  4. glennm
    Member
    Plugin Author

    Posted 1 year ago #

    It looks like you're using WP Minify. This plugin is probably inserting the additional code into the Google Content Experiments code. Could you disable the WP Minify plugin and see if the /*<![CDATA[*/ and /*]]>*/ disappear from the source code. Maybe you can get the page validated then.

    (I also don't see the content experiment code appearing in the source code anymore.)

    Which error message did you exactly get from Google?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.