Get OnSite Campaign Analytics

Prev Next

OnSite Campaign Analytics gives you the campaign results for the time period you selected.

Endpoint and Headers

GET https://analytics.api.useinsider.com/onsite/v1/campaign

Visit our Postman collection to test this request.

Headers

HeaderSample ValueDescription
X-INS-AUTH-KEY1a2b3c4d5e6fThis key is required to authorize your request. Refer to API Authentication Tokens to generate your token.

Query Parameters

ParameterData TypeDescriptionRequired
startTimeint64Specifies a 10-digit epoch start timeYes
endTimeint64Specifies a 10-digit epoch end timeNo
campaignBuilderIdIntegerYour campaign builder IDYes

Sample Request

Before sending the request, make sure:

  • To replace the authorization value with your own OnSite Campaign Analytics API key.
  • To replace the sample values in campaignBuilderId, startTime, and endTime with your own values in the required data type.
curl --location --request GET 'analytics.api.useinsider.com/onsite/v1/campaign?startTime=1633471200&endTime=1649195999&campaignBuilderId=2877'
2--header 'X-INS-AUTH-KEY: 1a2b3c4d5e6f'

Sample Responses

200 OK


{
   "data": {
       "detail": {
           "9": {
               "87": [
                   {
                       "conversion": 166400.0,
                       "significance": 0.0,
                       "averageOrderValueUplift": 0.0,
                       "bayesianSignificance": 0.9999,
                       "leadCount": 0,
                       "goalConversionRate": 0.3853082697713621,
                       "incrementalConversion": 0.0,
                       "averageOrderValue": 0.0,
                       "goal": "9",
                       "salesConversion": 229.0,
                       "conversionRateUplift": 0.0,
                       "incrementalRevenue": 0.0,
                       "goalConversion": 166400.0,
                       "revenue": 0.0,
                       "conversionRate": 0.3853082697713621,
                       "salesConversionRate": 0.0005302619818367904,
                       "campaignId": 87,
                       "campaignName": "My campaign",
                       "platform": "all",
                       "impression": 431862.0
                   }
               ],
               "88": [
                   {
                       "conversion": 105743.0,
                       "significance": 0.9999199999999999,
                       "averageOrderValueUplift": 0.0,
                       "bayesianSignificance": 0.0,
                       "leadCount": 0,
                       "goalConversionRate": 0.36993125645017405,
                       "incrementalConversion": 0.0,
                       "averageOrderValue": 0.0,
                       "goal": "9",
                       "salesConversion": 137.0,
                       "conversionRateUplift": 0.0,
                       "incrementalRevenue": 0.0,
                       "goalConversion": 105743.0,
                       "revenue": 0.0,
                       "conversionRate": 0.36993125645017405,
                       "salesConversionRate": 0.00047928072906645207,
                       "campaignId": 88,
                       "campaignName": "My campaign 2",
                       "platform": "all",
                       "impression": 285845.0
                   }
               ]
           }
       },
       "summary": {
           "87": 39,
           "88": 35
       }
   }
}

In the object:

  • Keys (e.g. 87, 88 as in the example above) represent the email variation IDs,
  • Values (e.g. 39, 35 as in the example above) )represent the Effective Days, the number of days when email variant had been viewed more than 10 times. 
Your title goes here
You can refer to Metric Definitions for further details.
  • 400 Bad Request: Sorry, we’ve received an invalid request from your side. You can try again later.
  • 400  Bad Request: Sorry, we couldn’t validate the request at the moment. You can try again later.
  • 500 Internal Server Error: Sorry, we couldn’t receive any response from our server. You can try again later.
  • 400 Bad Request: Sorry, we detected an invalid Campaign ID in your request. The Campaign ID is not found in the database. You can confirm your Campaign ID by checking the InOne panel.
  • 406 Not Acceptable Request: Sorry, we received an invalid request. We are able to provide the analytics data for only the last 1 year.

Limitations

  • All functions must be executed with an HTTPS GET request.
  • The x-ins-auth-key should be provided as the authorization key in the request header. If the key is incorrect, the operation will not be executed and an authorization error will return in the response.
  • This API provides data for a 1-year range.
  • You can send 100 requests per minute with the same API Key. If you exceed the rate limit, you will receive a 429 error.

The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team — we can adjust it to fit your needs.