CGI not passing JavaScript tracking

They have: 3 posts

Joined: Jun 2006

I am using a CGI program for an A/B split test. The software splits visitors evenly between Page A and Page B.

The problem: My tracking script does not pass through the CGI script. The tracking script is javascript. When I look at the referal information from somone that filled out my form, it looks like they bookmarked the site and came back. I can't tell what website referred me or what they searched on.

The support at my tracking company (hitslink) reccommended the following:
a) The CGI script must be modified such that it pulls the data from it's referring page and passes it via a query string to it's destination page.
b) The destination page then will pull that data from the query string and insert into the appropriate places in the tracking script.

Question:
Is the solution reccommended by my tracking company possible?
How long would it take somone to do this? (I would have to hire someone.)
Does anyone have any other solutions for doing an A/B split test? JavaScript, PHP, ???

Thank You. Scott

CptAwesome's picture

He has: 370 posts

Joined: Dec 2004

A/B split test? Not entirely sure what you mean by that.

You should be able to access GET variables through HTTP info gathered by CGI/Perl.

Quote:
The problem: My tracking script does not pass through the CGI script. The tracking script is javascript. When I look at the referal information from somone that filled out my form, it looks like they bookmarked the site and came back. I can't tell what website referred me or what they searched on.

Are you getting no referral info? Because if you're getting some, and just not from some people, then there is really nothing you can do unless you set up IP tracking and start saving click paths and referrals that way, that and some browsers don't support the HTTP_REFERRER header correctly and will give you the information of the last page they were on, even if it wasn't a link/click.

They have: 3 posts

Joined: Jun 2006

CptAwesome Thanks.

We are getting no information at all.

A/B split testing is where we have two advertising web pages that are exactly the same, except for one element, like a button that says "order now" or "buy now". Over time, you can see which one performs better, then use that one. We do PPC advertising to generate leads for our supervisory training series.

Scott

CptAwesome's picture

He has: 370 posts

Joined: Dec 2004

Then it's most likely that the CGI is somehow messing up the javascript on output, can you paste the code snippet from the script where the Javascript is being output?

They have: 3 posts

Joined: Jun 2006

I am not sure, when I asked the people at my tracking company what to do, they provided the info below.

To recap, you are simply using CGI to redirect a user to one of two pages, let's call them page 1 and page 2, correct? You are not using Perl to actually render any of these pages for you are you?

1) If you are using Perl to actually render your pages for you, then the tracking script must be also rendered dynamically from the CGI script.

2) If you are simply using CGI to re-direct, then the referring information will be lost on redirect because that information 'loses scope'. In order to prevent this data loss, both the CGI script and the tracking script must be modified as follows:

a) The CGI script must be modified such that it pulls the data from it's referring page and passes it via a query string to it's destination page.

b) The destination page then will pull that data from the query string and insert into the appropriate places in the tracking script.

If you don't like the idea of passing it through the query string, then you may try to do it with a form instead. Though I'm not quite sure how you would go about 'posting' to a page from a CGI script, but I'm sure a clever solution exists.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.