Rich-text Reply

passing url values into results and tying it to variation and revenue

rbeltran 01-27-15

passing url values into results and tying it to variation and revenue

url: https://give.womenforwomen.org/donate/?src=XXX

 

I would like to track the revenue and variation tied to my url's src value in the results section of my experiment. 

 

ie

url: https://give.womenforwomen.org/donate/?src=XXX

 

under results:

 

  1. src: XXX 
  2. variation#
  3. revenue

Is there a way to see this on optimizely or do I have to create a separate experiment per unique src value?

 

Thanks,

Reden

Level 1

JDahlinANF 01-28-15
 

Re: passing url values into results and tying it to variation and revenue

[ Edited ]

Presuming you already have revenue passed to Optimizely, you can run some code on your site that puts the value of the src into a segment.  This will allow you to see how each src value performs across variations.

something like:

if (src is in the URL) {
    optimizely.push(['addToSegment', 'src', value of src from the URL]);
    optimizely.push(['trackEvent', "sendSegmentData"]);
}

 

If you want to see "src=abc" as variation A and "src=xyz" as variation B, it gets a bit trickier...
You could place code on your page that uses the "bucketVisitor" API call to force a user into the "A" or "B" variation of the experiment.