WordPress.org

Support

Support » Plugins and Hacks » Google Content Experiments » [Resolved] Code will not Validate

[Resolved] Code will not Validate

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author glennm

    @glennm

    Could you please tell me what you exactly edited?

    You need to insert <?php do_action( 'wpe_gce_head' ); ?> right after the opening <head> tag. I believe OptimizePress has more than one header file, so you might need to edit multiple files.

    I edited the OptimizePress: Main Index Template (admin/index.php)
    it now reads <head>
    <!– Google Analytics Content Experiment code –>
    <script>function utmx_section(){}function utmx(){}(function(){var
    k=’72203813-0′,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 –>

    </head>

    Plugin Author glennm

    @glennm

    That is the wrong file.
    You need to edit header files in the root of OptimizePress directory.
    I don’t know which files you have exactly, but you might need to edit for example:

    wp-content/themes/OptimizePress/header.php
    wp-content/themes/OptimizePress/header-myheader.php
    wp-content/themes/OptimizePress/header-blogheader.php

    I have tried to add the code to Header.php on the 2nd line down and it appears to be working.

    Thank you for your help.
    Optimisepress need to update the videos

    Plugin Author glennm

    @glennm

    Glad I could help.

    If you found this plugin useful, there are several things you can do:

    – Rate the plugin
    – Vote that the plugin works (with the WordPress version you’re currently using).
    – Write a review for the plugin
    – A combination of the steps above

    I would be most grateful for your contribution!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Code will not Validate’ is closed to new replies.
Skip to toolbar