Rich-text Reply

Help - "Sticky" audience targeting for test

OptimizelyTest 07-19-16

Help - "Sticky" audience targeting for test

I'm trying to track all phone calls that come from my SEM efforts.  I have a unique phone number that tracks SEM landing pages.  The problem is when the user clicks to other parts of the site that presents the generic phone number.  Also, if the user leaves the site and comes back by Googling our homepage, it will present the generic phone number as well.  I'm trying to use Optimizely to solve this:


I plan to create a new A/B test in Optimizely, targeting SEM traffic.  "Variation A" will have all our pages' header to include the SEM tracking phone number, and 100% of test traffic will go to Variation A.  A couple of questions:


1. Is it easy to change all my pages at the same time?  They mostly use the same header displaying the generic phone number, I want to change that phone number on all pages for users that came from SEM.


2. Is there a way to make the targeting "sticky"?  If the user leaves and comes back organically, I'd still like him/her to be in the targeted pool, see the SEM tracking phone number because s/he originally came from SEM.


Thanks everyone for the help.

JasonDahlin 07-20-16

Re: Help - "Sticky" audience targeting for test

Question 1: How can I make it affect all pages?

Answer 1: Have your experiment's URL targeting hit every page that has the header that you are wanting to modify.


Question 2: How can I make it sticky (beyond the landing page)

Answer 2: Use a Custom Audience that returns true if either the user is on the SEM landing page OR if they are already a member of the experiment.  Suppose your experiment's ID is "5848430917", you could run your check like this:

  try {
    if (document.cookie.indexOf('5848430917') > -1) {
      return true;
    if ("this is an SEM landing page") {
      return true;
  } catch(e) {
--Jason Dahlin
Analytics and Testing Guru Smiley Happy

Experimentation Hero