1. Help Center
  2. Implementation, Deployment, and Security

GET Assignment Data

Description: An API call that retrieves Campaign data and Assignments from the SiteSpect engines.

Example:

GET https://engine-336.sitespect.net

Note: SiteSpect uses cookies to track assignment, which need to be sent and updated with all calls. For convenience, cookies and headers can be passed/received in the body of the request/response.

Response Structure:

{
"VariationGroupID": {
   "QuickChange": string,
   "LiveVariables": json,
   "Control": boolean,
   "VariationGroupName": string,
   "AsmtCounted": boolean,
   "Metrics": [{
    "MetricID": number,
    "MetricName": string
    }]
},
...
}

Example Response:

{
"89": {
   "QuickChange": "All traffic",
   "LiveVariables": null,
   "Control": false,
   "Name": "Promotion",
   "AsmtCounted": false,
   "Metrics": []
},
"88": {
   "LiveVariables": {
     "key": "value"
   },
   "Control": true,
   "AsmtCounted": true,
   "Name": "Control Group",
   "Metrics": [
     {
       "ID": 138,
       "Name": "CountryViewName"
     }
   ]
}
}

Note that the JSON returned by the SiteSpect GET call includes the Variations (including QuickChange) that the visitor is assigned to. For example, Variation Group 89 in the JSON structure above is a QuickChange.

The important data points to store and track are: Variation Group ID, Metric ID, and AsmtCounted.

Essential Response Parameter Definitions

Variation Group ID: A unique identifier for the Variation Group that the visitor is assigned to. Use this identifier in your code to show changes you want to test in a Campaign.

Control: A Boolean that indicates whether a Variation Group the visitor is assigned to is the Control Group.

Metric ID: A unique identifier for an individual Metric, used to report Metric hits and value capture when sending visit data.

Note: Metric Triggers are passed for context when a Metric contains them. For example, the Metric could have a Trigger setup for a given URL and that extra information can be helpful in identifying when the Metric should be sent for a given visitor.

AsmtCounted: Indicates whether the visitor is counted for a given Campaign. If this is true in the response of a GET call, then the given Campaign should always be marked as counted by passing the VariationGroup ID in the POST call payload under "AsmtCounted". Counted means that the visitor has seen the change being tested. For accuracy of data, we want to measure only visitors who have been exposed to the change.

Note: If a visitor is not counted, that visitor is eligible to be assigned to a different Campaign in a subsequent GET call.
For example, if an A/B test is measuring the effect of a change on a checkout screen and the visitor launched the website, is assigned to the test, but has never navigated to the checkout page, that visitor should not be counted. Thus, the code block where the change tested exists should update visit AsmtCounted in POST visit data.
Note: If you initiate the GET call from the page where the change is being tested, you can always mark the visitor as counted.