analytics

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-analytics"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/83d044a8-2e41-46eb-a741-5043d696d3f3/social-card.svg?v=3e7ae33eec8b" alt="analytics" width="600" height="315"></a>
POSThttps://hermeticor.com/v1/analytics/cohorts

Weekly retention by first-event cohort

Request body

application/json
anchorEventstringrequired
returnEventstringrequired
fromstringrequired
tostringrequired
weeksinteger
= 8
{
  "anchorEvent": "string",
  "returnEvent": "string",
  "from": "string",
  "to": "string",
  "weeks": 8
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/analytics/cohorts" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"anchorEvent":"string","returnEvent":"string","from":"string","to":"string","weeks":8}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "weeks": 0,
  "cohorts": [
    {
      "cohort": "string",
      "size": 0,
      "retained": [
        0
      ]
    }
  ]
}
Schema
weeksintegerrequired
cohortsobject[]required
Show child parameters
cohortstringrequired
sizeintegerrequired
retainedinteger[]required
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

GEThttps://hermeticor.com/v1/analytics/attribution/settings

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/attribution/settings" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "conversionEvent": "string",
  "conversions": [
    {
      "label": "string",
      "event": "string",
      "valueProperty": "string",
      "targetMinor": 0,
      "folder": "string"
    }
  ],
  "touchBasis": "delivery",
  "viewThrough": true,
  "windowDeliveryHours": 0,
  "windowClickHours": 0,
  "windowOpenHours": 0,
  "windowSmsClickHours": 0,
  "model": "first_touch"
}
Schema
conversionEventstringrequired
conversionsConversionsItem[]required
Show child parameters
labelstringrequired
eventstringrequired
valuePropertystring
targetMinorinteger
folderstring
touchBasisstringrequired
delivery | open | click
viewThroughbooleanrequired
windowDeliveryHoursintegerrequired
windowClickHoursintegerrequired
windowOpenHoursintegerrequired
windowSmsClickHoursintegerrequired
modelstringrequired
first_touch | last_touch | linear | u_shaped | w_shaped | full_path | time_decay | j_shaped | inverse_j
4XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

PATCHhttps://hermeticor.com/v1/analytics/attribution/settings

Conversion event, touch windows and model. Applies to conversions recorded from now on.

Request body

application/json
conversionEventstring
conversionsConversionsItem2[]
Show child parameters
labelstringrequired
eventstringrequired
valuePropertystring
targetMinorinteger
folderstring
touchBasisstring
delivery | open | click
viewThroughboolean
windowDeliveryHoursinteger
windowClickHoursinteger
windowOpenHoursinteger
windowSmsClickHoursinteger
modelstring
first_touch | last_touch | linear | u_shaped | w_shaped | full_path | time_decay | j_shaped | inverse_j
{
  "conversionEvent": "string",
  "conversions": [
    {
      "label": "string",
      "event": "string",
      "valueProperty": "string",
      "targetMinor": 0,
      "folder": "string"
    }
  ],
  "touchBasis": "delivery",
  "viewThrough": true,
  "windowDeliveryHours": 0,
  "windowClickHours": 0,
  "windowOpenHours": 0,
  "windowSmsClickHours": 0,
  "model": "first_touch"
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/analytics/attribution/settings" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversionEvent":"string","conversions":[{"label":"string","event":"string","valueProperty":"string","targetMinor":0,"folder":"string"}],"touchBasis":"delivery","viewThrough":true,"windowDeliveryHours":0,"windowClickHours":0,"windowOpenHours":0,"windowSmsClickHours":0,"model":"first_touch"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

4XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

GEThttps://hermeticor.com/v1/analytics/revenue

Attributed purchase revenue by campaign, flow, variant, node, channel or day

Parameters

fromstringqueryrequired
tostringqueryrequired
groupBystringquery
campaign | flow | variant | node | channel | day | conversion = campaign
channelstringquery
email | sms | whatsapp | push | postcard
goalstringquery

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/revenue?from=<from>&to=<to>" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "groupBy": "string",
  "rows": [
    {
      "key": "string",
      "currency": "string",
      "conversions": 0,
      "revenueMinor": 0
    }
  ]
}
Schema
groupBystringrequired
rowsobject[]required
Show child parameters
keystringrequired
currencystringrequired
conversionsintegerrequired
revenueMinorintegerrequired
4XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

GEThttps://hermeticor.com/v1/analytics/revenue/campaigns

Attributed orders, revenue and messages sent per campaign (revenue per recipient)

Parameters

fromstringqueryrequired
tostringqueryrequired
limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/revenue/campaigns?from=<from>&to=<to>" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "campaignId": "string",
      "currency": "string",
      "conversions": 0,
      "revenueMinor": 0,
      "recipients": 0
    }
  ],
  "nextCursor": "string"
}
Schema
itemsobject[]required
Show child parameters
campaignIdstringrequired
currencystringrequired
conversionsintegerrequired
revenueMinornumberrequired
recipientsintegerrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

GEThttps://hermeticor.com/v1/analytics/revenue/forms

Revenue from buyers per signup form (the form they last submitted in the 30 days before ordering)

Parameters

fromstringqueryrequired
tostringqueryrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/revenue/forms?from=<from>&to=<to>" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "windowDays": 0,
  "items": [
    {
      "formId": "string",
      "currency": "string",
      "conversions": 0,
      "revenueMinor": 0
    }
  ]
}
Schema
windowDaysintegerrequired
itemsobject[]required
Show child parameters
formIdstringrequired
currencystringrequired
conversionsintegerrequired
revenueMinornumberrequired
4XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

GEThttps://hermeticor.com/v1/analytics/time-to-convert

Parameters

fromstringqueryrequired
tostringqueryrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/time-to-convert?from=<from>&to=<to>" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "conversions": 0,
  "medianHours": 0,
  "buckets": [
    {
      "label": "string",
      "count": 0
    }
  ]
}
Schema
conversionsintegerrequired
medianHoursnumberrequired
bucketsobject[]required
Show child parameters
labelstringrequired
countintegerrequired
4XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

GEThttps://hermeticor.com/v1/analytics/conversions

Attributed conversion rows, filterable by profile, conversion and date

Parameters

limitintegerquery
= 50
cursorstringquery
profileIdstringquery
goalstringquery
fromstringquery
tostringquery

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/analytics/conversions" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "profileId": "string",
      "ref": "string",
      "eventId": "string",
      "goalKey": "string",
      "attributedKind": "string",
      "attributedId": "string",
      "jobId": "string",
      "channel": "string",
      "variantKey": "string",
      "stepKey": "string",
      "model": "string",
      "windowHours": 0,
      "valueMinor": 0,
      "currency": "string",
      "touchAt": "2024-01-01T00:00:00Z",
      "at": "2024-01-01T00:00:00Z"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem87[]required
Show child parameters
idstringrequired
profileIdstringrequired
refstringrequired
eventIdstringrequired
goalKeystringrequired
attributedKindstringrequired
attributedIdstringrequired
jobIdstringrequired
channelstringrequired
variantKeystringrequired
stepKeystringrequired
modelstringrequired
windowHoursintegerrequired
valueMinorintegerrequired
currencystringrequired
touchAtstringrequired
atstringrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

5XX Default Response

Same as 4XX · POST /v1/analytics/cohorts

Updated