Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

[SOLVED] How do I enter Google Website Optimizer control/tracking tags


  #1  
Old Jan 27, 2011, 06:01 PM
dutchess
 
18 posts · Jan 2011
Hi, I have been trying to figure out how to get Google Website Optimizer working with Wordpress.

I am on WP ver. 3.0.4
I am on Ata. ver. 3.6.1

The instructions from google are:

Control and Tracking Script: Paste the following script immediately after the opening <head> tag of your test page's source code.


I think those directions are for static html pages. Because Wordpress is a dynamic CMS, what is the best way to insert the scripts? I need to find a way to insert the scripts directly after the opening <head> tag, but only on the page that I am testing, not globally.

I have searched through the Wordpress plugin's but have not found one that fits my need. (Google website optimizer for wordpress is a plugin that will put the scripts in the page, but it has not been updated in a while and puts the tags at the end of the header, right before </head> which is the wrong location)

I have been toying with the idea of putting in some conditional code in the header.php, so that it will only put the control/tracking code on the page I select, but I have zero experience with .php

Any help would be greatly appreciated.
  #2  
Old Jan 27, 2011, 06:39 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
look at the Atahualpa 'Add HTML/CSS Inserts' option page
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jan 27, 2011, 07:20 PM
dutchess
 
18 posts · Jan 2011
Thanks for the quick reply Juggledad. I looked through the 'Add HTML/CSS Inserts' option page and inserted the google scripts in the "HTML Inserts: Header" section.

When I looked at the source code, I did see the scripts at the right location right under the <head> tag However it appeared on every page. I need a way to input the script on one specific page. Is there any code I can input before the conversion/tracking script that tells it to only be on one page?

Last edited by dutchess; Jan 27, 2011 at 07:50 PM.
  #4  
Old Jan 28, 2011, 12:11 PM
dutchess
 
18 posts · Jan 2011
Update:

I got the website optimizer working for a multivariate experiment.

Here's what I did for anyone that is looking to test using Google Website Optimizer:

Download the wordpress plugin HiFi. It is a head injection/footer injection plugin that is page specific.

Go to google website optimizer, sign up for an account, and run a multivariate experiment.

Follow the steps on the google site and you will get scripts to insert into your site.

Paste the control/tracking scripts on the test page in wordpress:
- page>edit... you will see a new box called Head & Foot. Paste the code in the box called head injection.

Paste the scripts for page selection (in wordpress) on the test page USING THE HTML EDITOR.

Paste the conversion script on the conversion page in wordpress:
- page>edit... same as the control/tracking script, paste the conversion script in the head injection box.

After that you can validate the code in google and make your variations.


Notes:
One problem I had was that I was unable to preview my different variations on the google website. Just click continue and run the experiment. Go to the page on a few different computers to verify that the experiment is actually changing the variables. (or you can clear cookies, etc and go back to the site as a 'new visitor')

Be wary of switching between the html and visual editors. I noticed that sometimes when I switched from html to visual, wordpress would 'clean up' the page selection script and make it inoperable. (it would change some words and delete </noscript> at the end of the section) If you have problems, I recommend turning off the visual editor and seeing if that helps.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put a Google Voice call widget on my website? jms5017 Sidebars & Widgets 1 Aug 6, 2010 07:14 PM
Google Adwords Conversion Tracking code - where to put it? jtsharp eCommerce & Atahualpa 4 Apr 21, 2010 04:49 PM
Meta tags for Google searches cmagwood Atahualpa 3 Wordpress theme 0 Feb 2, 2010 11:40 AM
Google Web Site optimizer ldsmedia Atahualpa 3 Wordpress theme 2 Jun 29, 2009 06:34 PM
How do I enter shortcode? LemBook Sidebars & Widgets 8 May 17, 2009 06:40 PM


All times are GMT -6. The time now is 11:04 AM.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.