View Subscriptions report


                https://api.ocamba.com/v1/hood/reports/subscriptions
            

Subscriptions report enables users analysis


Name
Description
sortstring
Sorts the response by specified field(s) with the option to specify sorting order (ascending by default, add prefix "-" for descending).

Examples:
GET /VERSION/hood/RESOURCE_NAME?sort=name → sorts per name, ascending
GET /VERSION/hood/RESOURCE_NAME?sort=-id → sorts per id descending
GET /VERSION/hood/RESOURCE_NAME?sort=id,-name → sorts per id ascending, then name descending

See tips for the list of sortable fields.


Example: sort=-field1,field2

pagestring
The page number indicates which set of items will be returned in the response. The format of request is "page=N,M" where 'N' (required) represents page number and 'M' (optional) is number of items per page.

Examples:
N=1, M=20 → returns page 1 with 20 items
N=2, M=20 → returns page 2 with 20 items (items 21-40)
N=3 → returns page 3. The number of objects returned depends on the resource settings.


Example: page=1,10

outstring
Data format output - 'csv' (default) or 'json'.


Example: out=json

resolutionstring
Data resoulution, supported values 'hour', 'day'.


Example: resolution=hour

fieldsstringrequired
Fields is array of dimensions and measures. You can use dimensions to categorize, segment, and reveal the details in your data. Measures contain numeric, quantitative values that you can measure. At least one measure is required.


Example: client_id,ad_spam_impressions

200 - OK
Arrow
Name
Description
ad_clicksstring
Number of times user has clicked.


Example: 10

ad_impressionsstring
Number of times user has viewed an ad.


Example: 1063

ad_last_clickeddateTime
Timezone: GMT.


Example: 2022-03-20 20:45:11

ad_last_impressiondateTime
Timezone: GMT.


Example: 2022-03-20 20:45:11

ad_last_serveddateTime
Timezone: GMT.


Example: 2022-03-20 20:45:11

ad_servedstring
Number of times user has received an ad.


Example: 89

ad_spam_impressionsstring
Number of times user views an spam impression.


Example: 0

browser_idinteger
A unique browser identifier.


Example: 12

browser_namestring
The browser name.


Example: Chrome

client_idstring
A unique identifier generated by the Ocamba platform.


Example: 1094

container_idinteger
Dimension
Unique container identifier generated on Ocamba platform.


Example: 126598752

container_namestring
Dimension
Container name created on Ocamba platform.


Example: test.demo.com

country_codestring
The two letter country code.


Example: RS

country_namestring
The country name.


Example: Serbia

first_session_datedate
Timezone: GMT.


Example: 2022-01-13

os_idstring
A unique operating system identifier.


Example: 4

os_namestring
The operating system name.


Example: iOS

push_clicksstring
Number of times user clicked on push notification.


Example: 122

push_credentialsobject
Credential object.


Example: { "endpoint":"https://fcm.googleapis.com/fcm/send/example" }

push_last_toucheddateTime
Timezone: GMT.


Example: 2022-03-20 20:45:11

push_statusstring
User status, user can be 0 (inactive), 1 (subscribed) or 2 (unsubscribed).


Example: 1

push_subscription_timedateTime
Timezone: GMT.


Example: 2022-03-22 10:17:33

push_unsubscription_timedateTime
Timezone: GMT.


Example: 2022-02-17 23:11:00

push_wokenupstring
Number of times user has received a notification.


Example: 122

retargetingobject
Retargeting object.


Example: { "retargeting":"test", "test":"value" }

tag_idstring
The ID of the tag, generated by the Ocamba.


Example: 1000

tag_namestring
The name of the tag, provided by the client.


Example: Demo Tag

timezonestring
The user timezone.


Example: Europe/Istanbul

total_pageviewsstring
Number of pageviews that user has made.


Example: 163

total_sessionsstring
Number of sessions that user has made.


Example: 10

user_langstring
The two letter language code.


Example: en

user_lang_namestring
The name of language.


Example: en

tip
1 Sortable fields are: client_id, first_session_date, tag_id, tag_name, container_id, container_name, total_sessions, total_pageviews, push_subscription_time, push_unsubscription_time, push_last_touched, push_credentials, push_status, push_wokenup, push_clicks, ad_last_served, ad_last_clicked, ad_last_impression, ad_served, ad_impression, ad_served, ad_impressions, ad_spam_impressions, ad_clicks, retargeting, os_id, os_name, browser_id, browser_name, country_code, country_name, timezone, user_lang, lang_name.

2 Filterable fields are: client_id, first_session_date, tag_id, tag_name, container_id, container_name, total_sessions, total_pageviews, push_subscription_time, push_unsubscription_time, push_last_touched, push_credentials, push_status, push_wokenup, push_clicks, ad_last_served, ad_last_clicked, ad_last_impression, ad_served, ad_impression, ad_served, ad_impressions, ad_spam_impressions, ad_clicks, retargeting, os_id, os_name, browser_id, browser_name, country_code, country_name, timezone, user_lang, lang_name.

3 To get data by the time in your local time zone, you should set tz query parameter to the specific time zone. See the list of valid time zones here -> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List.

4 For easier search, Reports API gives you the possibility of using one of the following labels: today, yesterday, last-7-days, last-30-days, last-24-hours, this-month, last-month, current-hour, last-hour, last-48-hours, last-2-days, month-to-date, month-to-yesterday, quarter-to-date.
note
1 When filtering stat_date, use one of the following formats:
- Single format: YYYY-mm-dd;

Displaying stats for this specific day
- Range format: rf:YYYY-mm-dd,YYYY-mm-dd;
Requires usage of the range operators:
- r - range - The value must be in a specified open range, where both endpoints are excluded.
- rf - range full - The value must be in a specified closed range, where both endpoints are included.
- rl - range left - The value must be in a specified half-open range, where only left or start point is included.
- rr - range right - The value must be in a specified half-open range, where only right or end point is included.

Displaying stats in this specific range.
- Hour range format: rl: YYYY-mm-dd hh:00:00,YYYY-mm-dd hh:00:00
If you exclude this parameter, the default setup displays "today" stats.

200 Arrow
[
    {
        "ad_last_clicked": "2024-03-31T16:48:10Z",
        "ad_last_impression": "2024-03-08T17:02:29Z",
        "ad_served": 79,
        "ad_impressions": 74,
        "ad_clicks": 2,
        "timezone": "Europe/Vienna"
    }
]
{
  "client_id": "1094",
  "first_session_date": "2022-01-13",
  "tag_id": "1000",
  "tag_name": "Demo Tag",
  "container_id": 126598752,
  "container_name": "test.demo.com",
  "country_code": "RS",
  "country_name": "Serbia",
  "os_id": "4",
  "os_name": "iOS",
  "browser_id": 12,
  "browser_name": "Chrome",
  "user_lang": "en",
  "user_lang_name": "en",
  "timezone": "Europe/Istanbul",
  "total_sessions": "10",
  "total_pageviews": "163",
  "push_subscription_time": "2022-03-22 10:17:33",
  "push_unsubscription_time": "2022-02-17 23:11:00",
  "push_last_touched": "2022-03-20 20:45:11",
  "ad_last_served": "2022-03-20 20:45:11",
  "ad_last_clicked": "2022-03-20 20:45:11",
  "ad_last_impression": "2022-03-20 20:45:11",
  "push_credentials": "{\n  \"endpoint\":\"https://fcm.googleapis.com/fcm/send/example\"\n}",
  "push_status": "1",
  "push_wokenup": "122",
  "push_clicks": "122",
  "retargeting": "{\n  \"retargeting\":\"test\",\n  \"test\":\"value\"\n}",
  "ad_served": "89",
  "ad_impressions": "1063",
  "ad_spam_impressions": "0",
  "ad_clicks": "10"
}