New Tracking Structure - Advanced Integrations

This Article Will Help You:


Perform Advanced Integrations

Convert provides a way to send visitors and conversion data back to the Convert servers from third-party applications using HTTP requests. This allows you to send conversion data from CRM's, e-commerce, and any system where the conversion does not happen on the same site as the visitor arrives.

Both HTTP POST and the REST API HTTP GET requests can be used to notify the Convert of these conversions. 

You will need to make the requests to the following URL:
https://10000001.metrics.convertexperiments.com/track
Where the10000001 is your project id.

  1. Using the HTTP POST method.

    You will need to submit a POST request that looks like the following:
    {
    "cid":"12345",
    "pid":"12345",
    "seg":{
    "browser":"CH",
    "devices":["DESK"],
    "source":"direct",
    "campaign":"",
    "new":1,
    "ctry":"RO",
    "cust":["123","456"]
    },
    "vid":"1588166554499-0.2020703998482254",
    "tid":"101",
    "ev":[
    {"evt":"viewExp","vars":["12345","6789"],"exps":["ABCD","DEF"]},
    {"evt":"hitGoal","goals":[12345],"vars":["12345","6789"],"exps":["ABCD","DEF"]},
    {"evt":"tr","goals":[12345],"vars":["12345","6789"],"exps":["ABCD","DEF"],"r":123.23,"prc": 2}
    ]
    }:

  2. Using the REST API HTTP GET Method

    Issue a GET Request to the above URL with the above JSON as query string params.

    Eg: https://10024405.metrics.convertexperiments.com/track?cid=12345&pid=12345&seg[browser]=CH&seg[devices][]=DESK&seg[source]=direct&seg[campaign]=test_campaign&seg[new]=1&seg[cust][]=123&seg[cust][]=456&vid=1588166554499-0.2020703998482254&ev[0][evt]=viewExp&ev[0][vars][]=12345&ev[0][vars][]=6789&ev[0][exps][]=ABCD&ev[0][exps][]=DEF&ev[1][evt]=hitGoal&ev[1][goals][]=12345&ev[1][vars][]=12345&ev[1][vars][]=6789&ev[1][exps][]=ABCD&ev[1][exps][]=DEF

 

Parameters explanation:

  1. cid: The account id. 
  2. pid: The project id.
  3. seg: (optional)This is a group of properties that can be sent with each event.
    • browser: One of IE, CH, FF, OP, SF, OTH.
    • devices: Device, one or more of DESK, OTHDEV , IPAD, ALLTAB, OTHTAB, OTHPH, IPH, ALLPH.
    • source: One of direct, referral, Search, Campaign.
    • campaign: A string representing a custom campaign.
    • new: 0 if a new visitor in this session, 1 if returning.
    • ctry: Two-letter ISO country code.
    • cust: Array of IDs of custom audiences setup into the project as segments.
  4. vid: Session ID, if you are not using the one specified in the _conv_s cookie, then create a different one for each reques.
  5. tid: Transaction ID, this is used for deduplication.
  6. ev: List of events that will be sent.
    • evt: tracked event type which has to be one of "hitGoal" (conversion of a goal), "viewExp"(view of an experiment's variation), "tr"(transaction).
    • exps: list of experiences' IDs the user was bucketed into
    • vars: list of variations' IDs the user was bucketed into
    • r represents the transaction amount.
    • prc would represent the ordered products count. 
 

Important

Your tracking requests will need to include the user-agent header with a value. You can use any value. This is required for the request to go through our firewall and be recorded. Otherwise, you will get a 301 HTTP error.