Google Content Experiments
Can't put code on page (9 posts)

  1. lubsmith
    Posted 2 years ago #

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

    <?php do_action( 'wpe_gce_head' ); ?>

    after <head profile="http://gmpg.org/xfn/11"> (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!


  2. glennm
    Plugin Author

    Posted 2 years ago #

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

  3. lubsmith
    Posted 2 years ago #

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


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

    Thank you!

  4. glennm
    Plugin Author

    Posted 2 years ago #

    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?
  5. lubsmith
    Posted 2 years ago #

    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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    <?php do_action( 'wpe_gce_head' ); ?>
    <meta name="google-site-verification" content="PUBOo1MtP0Sx2ArzZxlRdDVt7-HB393IUnnyLyoH0EE" />
    <link href='http://fonts.googleapis.com/css?family=OFL+Sorts+Mill+Goudy+TT' 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!

  6. glennm
    Plugin Author

    Posted 2 years ago #

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

  7. lubsmith
    Posted 2 years ago #

    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?

  8. glennm
    Plugin Author

    Posted 2 years ago #

    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.

  9. lubsmith
    Posted 2 years ago #

    Ok, then. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Content Experiments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic