Giter VIP home page Giter VIP logo

optimize_ab's Introduction

How to use Optimize_AB

Taken from but altered slightly: http://support.google.com/websiteoptimizer/bin/static.py?hl=en&topic=29622&guide=29619&page=guide.cs#m2

Multi-Variate Control & Tracking Script

The control script goes on your test page and makes sure that the experiment variations are switched randomly and that all variations are displayed an equal number of times.

The tracking script goes on your test page ensures that visits to the page are recorded in the experiment.

The control script immediately after the head tag.

mv_head(k, ua, pv, gv)

k: the value listed in the control script:

{var k="#{k}" # Example: 262340015

ua: the Account number listed in control script:

_gaq.push(['gwo._setAccount', 'ua']); # Example: UA-46835225-6

pv: the track page view link listed in control script:

_gaq.push(['gwo._trackPageview', '/pv/test']); # Example: 6234623

Multi-Variate Page Sections Scripts

The page sections script is used to mark the elements that will be varied during the experiment. Essentially, you need to use the script provided by Website Optimizer to define the beginning and end of each element. For each element, you will need to name the page section in the script. As an example, let's say you defined a header that welcomes people to your page. The starting HTML code looks like this:

<h1>Welcome!</h1>

After adding your section script, the header will look like this (with the custom name "Headline" for this section in italics):

<h1>
  <%= mv_begin_section("Headline") %>
    Welcome!
  <%= end_section %>
</h1>

in HAML a link might be written as:

= link_to (mv_begin_section('Headline') + "Welcome" + mv_end_section)

Conversions Javascript function

Conversions are initiated via a javascript function 'doGoal' You'll need to add a snippet of text to the link / links that you want to track as a conversion. Let's say your link looks like this:

<a href="http://www.example.com/promotion">Featured Products</a>

To count a conversion when this link is clicked, add:

onclick="doGoal(this);return false;"

to the HTML tag. The new link will look like this (addition in bold):

<a href="http://www.example.com/promotion" onclick="doGoal(this);return false;">Featured Products</a>

You can modify as many links as you want to count as a conversion, but all of them will be counted identically as conversions in your experiment results. In other words, Website Optimizer will not differentiate between them when reporting conversions.

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.