Welcome! To use this support forum, please Login or Join Today!

You are here → Home :: Forum Home :: General WordPress :: WordPress :: Thread

   

Google Analytics Experiments - How to Make a Copy of “default theme” 

{name}
Rank

Total Posts: 4

Joined 2012-01-31

PM

 
I'm advertising my website on Google Adwords. I want to make use of the new Google Content Experiments (old Website Optimizer).

I need to place the javascript code immediately after the opening header tag.

I tried to just add the code at the very beginning of the text in the html view, but it doesn't work because 1) it shifts the content down about 5 lines and 2) Google tests the page and says the javascript code is broken.

The best explanation I found online was to MAKE A COPY of the template page in the c-panel file manager of my hosting account and then on the page I want to experiment select that "copy" as the page template.

I tried making a copy of page.php in the theme folder so that I can put Google's javascript in the head section as they instruct and then select that on the Page Attributes section of the particular page I want to test, so that the other pages on the site aren't affected, but it didn't show up - It only gives me two options to choose from: default template, redirect.

Is there any other way I can do this?
{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 
You'll probably want to add the code to header.php, although it's difficult to say not knowing what theme and version you're using. There is a plugin for what you're doing here: http://wordpress.org/extend/plugins/google-content-experiments/
{name}
Rank

Total Posts: 4

Joined 2012-01-31

PM

 
Hi Casey, thank you for your reply.

I didn't mention the theme, sorry, it's Avalon.

I've tried the plugin but it keeps telling me there's broken script on the page because there's other scripts on the page as well, which I can't remove (tracking codes)

I also can't put the code into the header.php because it's only certain pages that it must be implemented on.

I do appreciate your reply though.