Support » Plugin: Google Content Experiments » Can't put code on page

  • I installed the Google Content Experiments plug-in, activated it, and added the following code:

    <?php do_action( ‘wpe_gce_head’ ); ?>

    after <head profile=”″> (Didn’t see a straight <head> tag)

    Saved the file and went back to the page for testing, checked the box and the field for pasting the Google Experiments code does not appear.

    Thoughts on why that might be? Thanks!

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


    Could you please tell me the link to the page you’re trying to use the code on? Thanks!

    Thanks for your response! The page I’m trying to put the code on is at:

    End Obsession with Food

    I want to test this home page against an identical page with a different headline.

    Thank you!

    Plugin Author glennm


    That’s weird. If you set a static page as the frontpage the experiment code should be included on that page.

    Just to make sure:

    • You included the <?php do_action( 'wpe_gce_head' ); ?> code right after the <head> tag of the theme you’re currently using?
    • You set the front page of the website to a static page?
    • The experiment code and checkbox are actually saved when saving the page?

    Thanks Glenn. That’s correct. I placed that code snippet in the header.php file. At the bottom of this post is the <head> code from the header.php file so you can see where I placed it.

    HOWEVER, the front page is set to “your latest posts.”

    Just so you know, it is not the front page, but a different page that I want to do the experiment on. And, no, I can’t save the experiment code on that page. When I checked the box in the Google Experiments area, on the page, the box never appears so that I can paste the code there.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <head profile="">
    <?php do_action( 'wpe_gce_head' ); ?>
    <meta name="google-site-verification" content="PUBOo1MtP0Sx2ArzZxlRdDVt7-HB393IUnnyLyoH0EE" />
    <link href='' rel='stylesheet' type='text/css'>
    <title><?php wp_title(''); ?></title>
    <meta name="google-site-verification" content="fFsMdqRWqvhebuFuGTwPJl-JNXsK4BUjRBp9LjgPuJA" />
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/colorbox.css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php echo get_bloginfo_rss('rss2_url');  ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' );  ?>
    <link href="/calendar/calendar.css" rel="stylesheet" type="text/css" />
    <?php wp_head(); ?>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/colorbox/jquery.colorbox.js"></script>
    <script>var $_ = jQuery;
    				$_(".ajax").colorbox({iframe:true, width:"875px", height:"100%", opacity:"0"});

    [Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

    Thanks so much for ALL your help!

    Plugin Author glennm


    So the problem is that you can’t insert the code when editing/creating the page. When you check the box, the textarea to enter the experiment code is not appearing.

    I think this issue has to do with Javascript. Please make sure that you’ve enabled JavaScript. You can use this website to check whether JavaScript is enabled and to find instructions on how to enable/disable JavaScript on each webbrowser.

    Enabling JavaScript should do the trick I guess…

    That is the correct problem, yes. However I DO have javascript enabled in both Firefox and Safari. So, that’s probably not the issue.

    I will say that the site is using a custom wp theme that someone else built. If it was created by customizing an existing theme, I don’t know what that theme is. Do you think there could be some other issue having to do with the code in the theme?

    Plugin Author glennm


    Then unfortunately I don’t know what’s causing the problem 🙁
    The theme should normally be not of any influence on the admin part of WordPress.

    Ok, then. Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Can't put code on page’ is closed to new replies.