Rich-text Reply

Engagement Goal / Metric in Optimizely X

stellasoft 03-05-17
Accepted Solution

Engagement Goal / Metric in Optimizely X

In Classic, there is an Engagement goal that is included as default for each experiment. Does Optimizely X have a predefined equivalent or do we have to create our own custom event to track this? I suspect the equivalent of Classic's Engagement goal is listening for every link click / touchend and all form submits.

tomfuertes 03-05-17
 

Re: Engagement Goal / Metric in Optimizely X

[ Edited ]

"Engagement" was used in Optimizely Classic since it increases when it wins (whereas bounce rate decreasing is better).  We coded up this ProjectJS Snippet to mimic engagement in X:

/**
 * OptimizelyX Engagement Goal
 * @author - tom@crometrics.com
 * To Implement:
 * - Paste this into projectjs
 * - Create a Custom Goal in OptimizelyX called "Engagement"
 */
window.optimizely = window.optimizely || [];
window.optimizely.push({
    type: "addListener",
    filter: {
        type: "lifecycle",
        name: "initialized"
    },
    // Add the campaignDecided function as a handler.
    handler: function () {
      var $ = optimizely.get('jquery');
      if (!$) return console.log('optimizely projectjs: jquery required');
      $(document).one('click', function () {
        window.optimizely.push({
          type: "event",
          eventName: "engagement"
        });
      });
    }
});

We also recommend creating a page called All Pages / Substring Match: "/". This let's you get "Total Pageviews" as a metric too when you add it to a project as a goal (since all pages have goals associated with them as well.

____
- 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: Engagement Goal / Metric in Optimizely X

Thanks Tom!
cjtesting 03-28-17
 

Re: Engagement Goal / Metric in Optimizely X

As the Project JS code runs on every page, regardless of whether or not an experiment is running, is it likely to cause any page load speed issues?