Get Web Push Top Metrics Analytics
- 09 Jan 2024
- 2 Minutes to read
Get Web Push Top Metrics Analytics
- Updated on 09 Jan 2024
- 2 Minutes to read
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Insider's web push API allows you to get the campaigns analytics of your web push notifications from your own back-end without using the Insider's InOne panel. This API returns top metric analytics (without campaign information) in the given time interval in API request payload. It corresponds to the data displayed below.
Endpoints and Headers
POST https://web-push.api.useinsider.com/v1/statistics/top-metrics
Headers
Header | Sample Value | Description |
---|---|---|
Authorization | Bearer 1a2b3c4d5e6f | This key is required to authorize your request. Refer to API Authentication Tokens to generate your token. |
Content-Type | application/json | This header specifies the media type of the resource. |
Body Parameters
Parameter | Description | Data Type | Required |
---|---|---|---|
partner_id | This is your partner identification number, available from InOne Settings > Account Preferences. | String | Yes |
start_date | This specifies the date on which you will start requesting campaign analytics. The date format should be YYYY-MM-DD. The Start Date cannot be earlier than the Campaign Create Date. | String | Yes |
end_date | This specifies the date on which you will stop requesting campaign analytics. The date format should be YYYY-MM-DD. | String | Yes |
Sample Example
curl --location --request POST 'https://web-push.api.useinsider.com/v1/statistics/top-metrics' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1a2b3c4d5e6f' \
--data '{
"partner_id": "YOURPARTNERID",
"start_date" : "2023-06-01",
"end_date" : "2023-06-08"
}'
Sample Request
Before sending the request, make sure:
- To replace the authorization value with your own API key.
- To replace the sample values in partner_id, start_date, and end_date with your own values in the required data type.
Sample Responses
200 OK
{
"success": true,
"overview": {
"total": {
"targeted": "470,621,008",
"deliveryRate": "0.00%",
"ctr": "0.63%",
"conversionRate": "0.00%"
},
"targeted": {
"sent": "468,743,394",
"dropped": "1,877,614"
},
"deliveryRate": {
"delivered": "6,221",
"undelivered": "468,737,173"
},
"ctr": {
"clicks": "39"
},
"conversionRate": {
"conversions": "0"
},
"revenue": "0 TRY"
},
"performance": [
{
"label": "Single",
"campaignCount": 2172,
"deliveryRate": "0.00",
"ctr": "0.47",
"conversionRate": "0.00",
"revenue": "0"
},
{
"label": "Trigger",
"campaignCount": 3,
"deliveryRate": "20.00",
"ctr": "0.00",
"conversionRate": "0.00",
"revenue": "0"
},
{
"label": "Cart Reminder",
"campaignCount": 1,
"deliveryRate": "0.00",
"ctr": "0.00",
"conversionRate": "0.00",
"revenue": "0"
},
{
"label": "In Stock Alert",
"campaignCount": 5,
"deliveryRate": "0.00",
"ctr": "0.00",
"conversionRate": "0.00",
"revenue": "0"
},
{
"label": "Price Alert",
"campaignCount": 1,
"deliveryRate": "200.00",
"ctr": "16.67",
"conversionRate": "0.00",
"revenue": "0"
},
{
"label": "Single API",
"campaignCount": 14,
"deliveryRate": "0.00",
"ctr": "11.69",
"conversionRate": "0.00",
"revenue": "0"
}
],
"dropped": [
{
"label": "frequencyCapped",
"count": "0",
"percentage": "0.00"
},
{
"label": "silentHours",
"count": "0",
"percentage": "0.00"
},
{
"label": "unsubscriptions",
"count": "63",
"percentage": "3.51"
},
{
"label": "serviceProviderErrors",
"count": "1,734",
"percentage": "96.49"
},
{
"label": "internalErrors",
"count": "0",
"percentage": "0.00"
}
],
"undelivered": [
{
"label": "offlineRecipients",
"count": "468,737,173",
"percentage": "100.00"
},
{
"label": "other",
"count": "0",
"percentage": "0.00"
}
]
}
401 Unauthorized
{
"message": "Unauthorized"
}
424 Failed Dependency
{
"message": "SERVICE:-"
}
Error Codes
- 400: Bad request
- 401: Unauthorized request
- 424 Failed Dependency
- 429 Request limit exceeded
Limitations
- All functions must be executed with an HTTPS POST request.
- The API Key should be provided as the authorization key on the request header. If the key is incorrect, the operation will not be executed and an authorization error will return in the response.
- You can make 30 requests per minute in aggregate.
Was this article helpful?