Let me begin by explaining I have limited html understanding and have just begun using GWO. I am trying to set up a multivariate experiment for one of my ebook sales pages as the "Test Page" and the e-Junkie Thank You page as the "Conversion Page." After about 10 hours of major frustration, I had the brilliant idea of looking here.



I found 1 post (http://www.e-junkie.com/bb/topic/2797) that covered the topic. I must admit that after reading all the discussions in this post twice, I'm embarrassed to say that I still don't fully understand it.



My major problem is that in addition to the normal level of confusion of just getting into the Google website optimizer, there is the additional issue of two different domains that need to be addressed. Taking a line out of "Gone with the Wind"- I'm Relying on the Kindness of Strangers.



All I need is "the fish," -- it's too confusing to learn "how to fish." In other words, here is what I do know:



1. My conversion page is: https://www.e-junkie.com/ecom/rp.php



2. My test page is: http://www.best-family-photography-tips.com/baby-poses-book-description.html



3. I do know where the "Control Script," "Tracking Script," "Conversion Script," and the "Page Section Scripts" go.



What I don't know is what to do with the code required for using multiple domains (or subdomains; which on GWO, have the same exact directions as far as I can tell). These are their instructions:





To run experiments across multiple sub-domains, you'll need to take two steps: Customize your tracking scripts, and update your control script.



1) Update your control script



After modifying your tracking scripts, you'll need to also update your control script. Below are the steps to correctly modify the control script.



1. To perform the necessary customizations to your control script, add the same urchin.js customizations. The control script also needs urchin.js-style customization, regardless of whether you are using ga.js or urchin.js for your tracking scripts. For example:



<script>

_udn = ".example.com";

</script>



2. The customizations should go at the very top of the page, just before the control script:



<script>

... Contents of the control script ...

</script>



2) Customize your tracking code



Next, you'll have to modify your tracking code.

1. Add the customized tracking script. Add. the following line (highlighted) on the tracking code of all pages of your subdomain and main domain. Please note that the below example of the code is using the ga.js version of the tracking code.



<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

try{

var pageTracker = gat.getTracker("UA-xxxxxx-x");

pageTracker._setDomainName(".example.com");

pageTracker._trackPageview("/xxxxxxxxxx/yyyy");

} catch(err) {}

</script>



2. Once you’ve finished making the customizations for your subdomains, the finished configuration should look like this:



<script>

_udn = ".example.com";

</script>



<script>

... Contents of the control script ...

</script>



<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

try{

var pageTracker = gat.getTracker("UA-xxxxxx-x");

pageTracker._setDomainName(".example.com");

pageTracker._trackPageview("/xxxxxxxxxx/yyyy");

} catch(err) {}

</script>





Google might just as well have used ancient hieroglyphics to explain it to me because I can't follow it at all. Not only don't I know where to put the code, but I'm not even sure what code to use. Can somebody please just tell me exactly what code to put where, so my experiment will pass the validation test?



Thanks to everyone for your help.

  • created

    Jul '09
  • last reply

    Jul '09
  • 1

    reply

  • 1.2k

    views

  • 2

    users

  • 10

    links

Honestly, much of the Google Analytics stuff is Greek to us, too. We only grasped it well enough to figure out how to add support for Analytics tracking in our cart and thank-you page, so when it comes to extra-weird stuff like GWO, well at that point, we don't know much if any more about it than you do.



If you can't get GWO working together with our standard GA integration, then you can just use the standard Google-documented tracking approach on all your pages (instead of using our customized GA tracking code at all), in which case we're not involved in your GA tracking, so you'd need to get any help required from Google support.



If having the "conversion" (thank-you) page on a different domain than your other pages is a problem, you can have E-junkie redirect buyers to a thank-you page on your own site after all checkouts, instead of using the E-junkie-generated thank-you page; that setting would be in Seller Admin > Account Preferences > Common Thank-you Page URL.



If you are selling downloads, you would also want some scripting in your site's thank-you page that would display the main contents of E-junkie's thank-you page (including the buyer's download links) in an iframe inside your page, as documented here:

http://www.e-junkie.com/ej/help.redirection.htm



If you're not a programmer, you could either hire someone to program some PHP scripting in your site's thank-you page that would do this reliably (see the Developers Directory link at the top of our site for some recommended candidates), or if you're willing to accept some tradeoffs, you can just copy this javascript and paste that into your site's thank-you page wherever you want the links displayed:



<script type="text/javascript">

<!--

function gup( name )

{

name = name.replace(/[[]/,"\[").replace(/[\]]/,"\]");

var regexS = "[\?&]"+name+"=([^&#]*)";

var regex = new RegExp( regexS );

var results = regex.exec( window.location.href );

if( results == null )

return "";

else

return results[1];

}

document.write("<iframe src=http://www.e-junkie.com/ecom/rp.php?noredirect=true&txnid="+gup('txn_id')+" style='width:100%;'></iframe>");

// -->

</script>



To use this javascript approach, you must be willing to accept that buyers who have javascript disabled in their browser would be unable to claim their download directly after checkout. These buyers would have to wait for their thank-you email, which would still link directly to the E-junkie thank-you/download page as a "last ditch fallback" technique we employ to make sure the buyer should always be able to claim their download, one way or another. Of course, if they have javascript disabled, they can't be tracked anyway, since all GA/GWO tracking code is based on javascript.



This would also mean that buyers who fail to click through past the end of checkout would not have their conversions tracked; however, buyers who do click through even before their actual payment is completed would still reach your site's thank-you page, which would track their conversion from your tracking code there.