Get Overall OnSite Analytics

Prev Next

The Overall OnSite Analytics provides all results for the selected time period and the applied filters. If you set the reportType value to summary, you receive a summarized response. At the same time, you get detailed results for the campaigns, including more values when you select the details for the same request.

Endpoint and Headers

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

Visit our Postman collection to test this request.

Header

Sample Value

Description

X-INS-AUTH-KEY

1a2b3c4d5e6f

This key is required to authorize your request. Refer to API Authentication Tokens to generate your token.

Query Parameters

Parameter

Data Type

Description

Required

startTime

int64

Specifies a 10-digit epoch start time

Yes

endTime

int64

Specifies a 10-digit epoch end time

No

campaignReportType

String

Your campaign report time. Its values can be "ab", "hundred".

Yes

selectedGoalType

String

Your goal type of the data. Its values can be "sales", "click", "salesFromClick".

Yes

reportType

String

Your report type for the data to be fetched. Its values can be "detail", "summary".

Yes

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 startTime, endTime, campaignReportType, selectedGoalType, and reportType with your own values in the required data type.

curl --location --request GET 'http://analytics.api.useinsider.com/onsite/v1/all?startTime=1650067200&endTime=1652804845&campaignReportType=ab&selectedGoalType=click&reportType=summary'
2--header 'X-INS-AUTH-KEY: 1a2b3c4d5e6f'

Sample Responses

200 OK

{
   "data": {
       "details": [
           {
               "significance": 0.9999199999999999,
               "averageOrderValueUplift": 0.2002548803800035,
               "bayesianSignificance": 0.9999,
               "builderType": "custom",
               "selectedGoalConversionRate": 0.0661764705882353,
               "revenueFromClick": 190622.0,
               "selectedGoalConversion": 288.0,
               "selectedGoalId": 0,
               "incrementalConversion": 124.39097744360902,
               "clickThroughRate": 0.0,
               "averageOrderValue": 259.0,
               "activeDays": 32,
               "goalId": 0,
               "salesConversion": 288.0,
               "conversionRateUplift": 0.760294117647059,
               "incrementalRevenue": 39287.21804511278,
               "clickConversion": 0.0,
               "revenue": 74592.0,
               "salesConversionRate": 0.0661764705882353,
               "campaignId": 6,
               "campaignName": "My campaign",
               "impression": 4352.0,
               "salesFromClick": 736.0
           },
           {
               "significance": 0.0,
               "averageOrderValueUplift": 0.0,
               "bayesianSignificance": 0.0,
               "builderType": "custom",
               "selectedGoalConversionRate": 0.03759398496240601,
               "revenueFromClick": 6905.0,
               "selectedGoalConversion": 160.0,
               "selectedGoalId": 0,
               "incrementalConversion": 0.0,
               "clickThroughRate": 0.15037593984962405,
               "averageOrderValue": 215.7875,
               "activeDays": 32,
               "goalId": 0,
               "salesConversion": 160.0,
               "conversionRateUplift": 0.0,
               "incrementalRevenue": 0.0,
               "clickConversion": 640.0,
               "revenue": 34526.0,
               "salesConversionRate": 0.03759398496240601,
               "campaignId": 5,
               "campaignName": "My amazing campaign",
               "impression": 4256.0,
               "salesFromClick": 32.0
           },
           {
               "significance": 0.9999199999999999,
               "averageOrderValueUplift": 0.4096872064857382,
               "bayesianSignificance": 0.9999,
               "builderType": "campaign",
               "selectedGoalConversionRate": 0.045020463847203276,
               "revenueFromClick": 49774.0,
               "selectedGoalConversion": 1056.0,
               "selectedGoalId": 0,
               "incrementalConversion": 252.71232876712338,
               "clickThroughRate": 0.17053206002728513,
               "averageOrderValue": 259.24147727272725,
               "activeDays": 32,
               "goalId": 0,
               "salesConversion": 1056.0,
               "conversionRateUplift": 0.31459754433833576,
               "incrementalRevenue": 126034.39726027398,
               "clickConversion": 4000.0,
               "revenue": 273759.0,
               "salesConversionRate": 0.045020463847203276,
               "campaignId": 11,
               "campaignName": "My great campaign",
               "impression": 23456.0,
               "salesFromClick": 192.0
           },
           {
               "significance": 0.0,
               "averageOrderValueUplift": 0.0,
               "bayesianSignificance": 0.0,
               "builderType": "campaign",
               "selectedGoalConversionRate": 0.03424657534246575,
               "revenueFromClick": 17654.0,
               "selectedGoalConversion": 800.0,
               "selectedGoalId": 0,
               "incrementalConversion": 0.0,
               "clickThroughRate": 0.1506849315068493,
               "averageOrderValue": 183.9,
               "activeDays": 32,
               "goalId": 0,
               "salesConversion": 800.0,
               "conversionRateUplift": 0.0,
               "incrementalRevenue": 0.0,
               "clickConversion": 3520.0,
               "revenue": 147120.0,
               "salesConversionRate": 0.03424657534246575,
               "campaignId": 10,
               "campaignName": "My awesome campaign",
               "impression": 23360.0,
               "salesFromClick": 96.0
           },
           {
               "significance": 0.93424,
               "averageOrderValueUplift": 0.24425137862865465,
               "bayesianSignificance": 0.967,
               "builderType": "campaign",
               "selectedGoalConversionRate": 0.03529411764705882,
               "revenueFromClick": 11958.0,
               "selectedGoalConversion": 192.0,
               "selectedGoalId": 0,
               "incrementalConversion": 33.86046511627907,
               "clickThroughRate": 0.21176470588235294,
               "averageOrderValue": 373.703125,
               "activeDays": 32,
               "goalId": 0,
               "salesConversion": 192.0,
               "conversionRateUplift": 0.21411764705882352,
               "incrementalRevenue": 24254.779069767443,
               "clickConversion": 1152.0,
               "revenue": 71751.0,
               "salesConversionRate": 0.03529411764705882,
               "campaignId": 15,
               "campaignName": "My perfect campaign",
               "impression": 5440.0,
               "salesFromClick": 32.0
           }
       ],
       "goalIdList": []
   }
}

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.

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.