Rich-text Reply

Is there equivalent of Conditional Activation in Optimizely X

stellasoft 03-09-17
Accepted Solution

Is there equivalent of Conditional Activation in Optimizely X

The issue I have here is, I don't want to use polling because this check needs to be site wide and secondly, I can NOT modify the code on the server side.  The old Conditional Activation would have been perfect, but that's no longer an option under X. 

tomfuertes 03-09-17
 

Re: Is there equivalent of Conditional Activation in Optimizely X

It's in Pages -> Activation Options:

https://help.optimizely.com/Build_Campaigns_and_Experiments/Conditional_activation_for_pages_in_Opti...
____
- Tom Fuertes | CTO @ CROmetrics / LinkedIn
"Most Impactful Use of Personalization" and "Experience of the Year" Optie award winner.


Experimentation Hero
stellasoft 03-09-17
 

Re: Is there equivalent of Conditional Activation in Optimizely X

[ Edited ]

Hi Tom, I've gone over that article already. Maybe I'm not understanding the Callback activation, but that seems to require editing the site's code. Polling would work, but not a good choice for this particular situation.

 

Edit: maybe i was wrong about that. Maybe this should work? I'll give this a try:

 

function callbackFn(activate, options) {

  // my condition:

  if(document.title == "blah"){

    activate();

  }

}

 

2nd EDIT: Ok, my bad for not checking this first before posting. Callback Activation does indeed work (still need to prevent the flash of original page, so still incomplete):

 

function callbackFn(activate, options) {
   var activateCallback = activate;
   document.addEventListener("DOMContentLoaded", function(event) { 
      if(document.title.toLowerCase().indexOf('not found') > -1) {
         activateCallback();
      }
   });
}