Polymorphic Tracker

Measure and Evaluate each step on your Goals

Track, Collect and analyze with Polymorphic Tracker your a 'goals funnel' along with a series of step you expect the user on your webapp or your website.

For example, if you have an ecommerce site, you might set a goal to see what percentage of monthly visitors complete transactions, and then set up an accompanying goal funnel for the expected series of pages leading up to the transaction.

Track an object

To set a tracker, you must add on your pages a javascript code. Three variables are availables tracker_type, tracker_step and tracker_cost, these variables are used to define a step of your goal. The tracker_cost variable isn't required. The url can be called with a simple http or security mode (https).

Name Type Required Note
uuid_object String Y Universal Unique IDentifier Object
tracker_type String Y Step type (e.g. Register, Checkout, Show, Like, Share...)
tracker_step Number Y tracker_step is a logical number (iterative) of your goals. For the last goal step it is necessary to set tracker_step to 999.
tracker_cost Float N tracker_cost is a cost of the step. You can define for each step an cost.

Statistics

Authenticating

The Polymorphic Tracker api requires an Webapp UUID which is provided during registration. The Webapp UUID identifies you as a unique entity making calls against the Polymorphic Tracker, and is used to get all statistics for overall call usage.

Methods and Query Parameters

Two formats are available: JSON and MessagePack

All

Returns all steps of goals funnels

  • URL: http://www.polymorphic-tracker.com/stats/{uuid_webapp}/all.{format}
  • Method: GET
  • Returns: tracker element serialize (json or msgpack)

Count

Returns the steps count of each goal funnel

  • URL: http://www.polymorphic-tracker.com/stats/{uuid_webapp}/count.{format}
  • Method: GET
  • Returns: tracker element serialize (json or msgpack)

Geo

Returns the steps count of each goal funnel geolocalized

  • URL: http://www.polymorphic-tracker.com/stats/{uuid_webapp}/geo.{format}
  • Method: GET
  • Returns: tracker element serialize (json or msgpack)

The Polymorphic Tracker provides also 4 additional query parameters, from, to, by to let you request all step that fall within a range of dates, and aggregate boolean value for aggregating of your uuid objects

Parameter Required Meaning
from N date start
to N date end
by N scope of date range (years, months, days)
aggregate N set value to true for aggregating of your uuid objects

Exemple

http://www.polymorphic-tracker.com/stats/00000000-0000-0000-0000-000000000000/count.json?from=2011-01-01&to=2011-07-31&by=months&aggregate=true

The following example illustrates a sample configuration of ecommerce tracking.

User show product (http://exemple.com/products/foo.html?uuid_object=1234567)

Your URL must have the parameters uuid_object to initialize tracker (e.g. http://bar.foo/index.html?uuid_object=1234567)

var tracker = tracker || {};
(function() {
  tracker.tracker_type = 'Show Product';
  tracker.tracker_step = 1;
  var ptrack = document.createElement('script'); ptrack.type = 'text/javascript'; ptrack.async = true;
  ptrack.src = document.location.protocol + '//www.polymorphic-tracker.com/tracks.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ptrack, s);
})();

User add product on card

var tracker = tracker || {};
(function() {
  tracker.tracker_type = 'Add Product';
  tracker.tracker_step = 2;
  var ptrack = document.createElement('script'); ptrack.type = 'text/javascript'; ptrack.async = true;
  ptrack.src = document.location.protocol + '://www.polymorphic-tracker.com/tracks.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ptrack, s);
})();

User create an account (http://exemple.com/register)

var tracker = tracker || {};
(function() {
  tracker.tracker_type = 'User register';
  tracker.tracker_cost = 1.5; /* cost by user */
  tracker.tracker_step = 3;
  var ptrack = document.createElement('script'); ptrack.type = 'text/javascript'; ptrack.async = true;
  ptrack.src = document.location.protocol + '//www.polymorphic-tracker.com/tracks.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ptrack, s);
})();

User checkout (http://exemple.com/checkout)

var tracker = tracker || {};
(function() {
  tracker.tracker_type = 'Checkout';
  tracker.tracker_cost = 500.00;
  tracker.tracker_step = 999;
  var ptrack = document.createElement('script'); ptrack.type = 'text/javascript'; ptrack.async = true;
  ptrack.src = document.location.protocol + '//www.polymorphic-tracker.com/tracks.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ptrack, s);
})();

Initialization

(function() {
  var ptrack = document.createElement('script'); ptrack.type = 'text/javascript'; ptrack.async = true;
  ptrack.src = document.location.protocol + '://www.polymorphic-tracker.com/tracks.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ptrack, s);

  $(".track").live('click',function(){
    Tracker.send($(this).attr("data-uuid"), $(this).attr("data-type"), $(this).attr("data-step"), $(this).attr("data-cost"));
  }
})();

User show product

<a href="#" class="track" data-uuid="PRODUCT-1234567" data-type="Show Product" data-step="1" data-cost="0">Show Product</a>

User add product on card

<a href="#" class="track" data-uuid="PRODUCT-1234567" data-type="Add Product" data-step="2" data-cost="0">Add Product</a>

User create an account

<a href="#" class="track" data-uuid="User" data-type="Register" data-step="3" data-cost="1.5">User register</a>

User checkout

<a href="#" class="track" data-uuid="Order" data-type="Checkout" data-step="4" data-cost="500.00">Checkout</a>

Initialization

(function() {
  var ptrack = document.createElement('script'); ptrack.type = 'text/javascript'; ptrack.async = true;
  ptrack.src = document.location.protocol + '://www.polymorphic-tracker.com/tracks.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ptrack, s);
})();

User show product

<a href="#" onclick="javascript:Tracker.send('PRODUCT-1234567', 'Show Product', 1, 0)">Show Product</a>

User add product on card

<a href="#" onclick="javascript:Tracker.send('PRODUCT-1234567', 'Add Product', 2, 0)">Add Product</a>

User create an account

<a href="#" onclick="javascript:Tracker.send('User', 'Register', 3, 1.5)">User register</a>

User checkout

<a href="#" onclick="javascript:Tracker.send('Order', 'Checkout', 4, 500.00)">Checkout</a>