Legacy Tracking Request Structure (Advanced Integrations)

This Article Will Help You:

 

 

Important

A new tracking structure interface has been published. You can find it here.

 

 

Perform Advanced Integrations

Convert experiment's javascript script sends data back to Convert's servers through a GET request. That GET request can be fired from custom apps or websites in order to send hits and conversions to Convert Experiments. We will explain below the structure of the tracking request assuming that you already have at least on experiment setup in Convert Experiments.

Basic API Structure

The basic structure of a tracking request is the following:

[project_id].track.convertexperiments.com/track/?c=[customer_id]&p=[project_id]&e=[experiment_id1]-[variation_id1]-[dot_separated_goal_ids],[experiment_id2]-[variation_id2]-[dot_separated_goal_ids]&ea=[count_first_time_fired_experiments]&g=[comma_separated_goal_ids]&ga=[count_goals_triggered_now_first_time]&t=[goal_id]|[transaction_value]|[transaction_products_count]

Parameter

Below is the meaning of each of the parameters used:

  • [project_id] - this is the project ID that can be found in project settings. In there the field "ID NUMBER"  glues together the account ID and project ID separated by an underscore char. For example, if ID number is 1111_2222 than 1111 represent the account id and 2222 represents the project's ID.
  • [customer_id] - account ID found as described above
  • [experiment_id] - experiment ID the visitor was presented. 
  • [variation_id] - ID of the variation that was presented to the visitor;
  • [dot_separated_goal_ids] - a dot separated list of goal IDS that were triggered for this visitor after he presented the Experiment_id-variation_id pair;
  • parameter e (previous three elements together) could hold more than one triplet experiment_ID, variation_ID, goals. More triplets can be used separated by a comma;
  • [count_first_time_fired_experiments] - parameter ea is a number that specifies how many triplets experiment_id-variaton_id-goals were triggered for the first time now; this is used for storing stats; the first "ea" triplets from the "e" parameter will be used for storing the stats; if storing stats is the only purpose of the tracking get request, than only the triggered now experiments data can be sent; ea parameter is required if e parameter is used; 
  • [comma_separated_goal_ids] - comma separated list of goal ids that were triggered for this visitor(this page visit or before);
  • [count_goals_triggered_now_first_time] - count of goals triggered now for the first time. The goals triggered now for the first time are the first count_goals_triggered_now_first_time from the list in the "g" parameter;
  • parameter "t" represents transaction data(revenue) that is sent to convert servers; the parts used inside the parameter are as follows
    • [goal_id] - the goal ID you want the the transaction data to be recorded for. This can be found in your Convert Experiments account; transaction data can be attached to multiple goals as well by providing a dot separated list of goal ids instead of a single goal id; Note: the goals provided here will not fire a conversion as well; to fire a conversion the other parameter explained above should be available;
    • [transaction_id] - The ID of the transaction as it comes from the external system. It has to be unique for each different transaction *
    • [transaction_value] - two decimal value of the transaction
    • [transaction_products_count] - number of items ordered in this transaction
 

Important

[transaction_id] is no longer stored on Convert servers as of February/March 2018, but any text string should be included in its place to be able to store the transaction. It does not matter if it is the same every subsequent time.


From the parameters presented above, project_id and customer ID are always required. The rest can be used separated or together. Some of them should be used in pair: example e and ea, g and ga

Example

Example request:

1.track.convertexperiments.com/track/?c=2&p=1&e=11-12-331.33.34,21-22-33.331.341&ea=1&g=331,33,34,341,35&ga=3&t=35|ab12345|1599.99|10

the above request sends data for project ID 1, customer ID 2 as follows:

  • this visitor was presented with experiments:
    • 11(variation 12) - goals 331,33 and 34 were hit after being presented with this experiment ;  
    • 21(variation 22) - goals 33,331 and 341 were fired after this experiment was presented to the user;
  • experiment 11 is fired now for the first time so convert will store stats for this experiment (hit);
  • goals 331,33,34,341 and 35 were hit for this visitor now and in the past; only the first three were hit now, so those will be counted as conversions in the Convert report;
  • a transaction occurred; should be connected to goal 35 and has ID ab12345, value 1599.99, 10 products were purchased;