Giter Club home page Giter Club logo

optimizely-time-to-conversion's Introduction

Optimizely Time To Conversion

Optimizely Analytics Extension that allows you to measure the "Time To Conversion" for a given metric within your experiment

This works by persisting a list of timeable events & bucketing timestamps in localStorage. Within Project JavaScript, there is an event tracking listener (docs) that checks to see if the fired event lives in the list of timeable events. If so, the elapsed time (in seconds) between the Start Timer At Event (api name) timestamp and the current time is calculated and this value is dispatched as an event (numeric metric) to Optimizely.

Update: Previously, the module used the Optimizely visitor attributes API to store the data. This resulted in sending large chunks of stringified JSON in every Optimizely event request. The timestamp data has since been moved to separate local storage keys. Caveat: Measuring time-to-conversion across domains will not work out of the box, since the timestamp data is no longer attached to the Optimizely visitor data storage.

Results Screen

How to install

How to use

  • Create a Numeric Metric (Optimizely docs) and take note of its api name
  • Navigate to the experiment to which you'd like to track the conversion
  • Visit the 'Metrics' tab and add the Numeric Metric you created in the first step
    • Configure the metric to the following settings Decrease in total value per conversion Configure Metrics
  • Visit the 'Integrations' tab and you will see a Time To Conversion integration module Integrations Screen
  • Check the 'tracked' checkbox in the upper right
    • Start Timer At Event (api name) - api name of the event you want to begin the timer (required)
    • Stop Timer At Event (api name) - api name of the event you want to stop the timer (required)
    • Elapsed Time Metric (api name) - api name of the numeric event you will track the elapsed time to (required)
    • Max Time To Conversion - will ignore elapsed times above the supplied value
    • Min Time To Conversion - will ignore elapsed times below the supplied value
    • Resettable - indicates you want to reset the timer if the user re-converts on Start Timer At Event
    • Resettable After Elapsed Time (sec) - will only reset the timer if a user re-converts on Start Timer At Event after the supplied number of seconds
  • Save your changes, Publish the experiment

Debugging

Use the following method to log the data persisted to the visitor profile via the extension

window.optimizely.get("custom/ttc").debug();

Enable logging to debug the following as they occur:

localStorage.setItem('logttc', 1);
  • Timeable events that are registered into the visitors profile (via the window.optimizely.get("custom/ttc").bindTTCTracking call within the extension
  • Dispatched tracking calls to Optimizely that include the numeric metric 'time to conversion'

Future enhancements

  • Multiple metric support (currently you can only configure to time a single metric)
  • Conversions in the same session only (extension setting)

optimizely-time-to-conversion's People

Contributors

cpreid avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.