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>
PATCHhttps://hermeticor.com/v1/analytics/reports/{id}/schedule

Email this report to recipients (and refresh a Google Sheet) daily, weekly or monthly; null schedule stops it

Parameters

idstringpathrequired

Request body

application/json
schedulestringrequired
daily | weekly | monthly
recipientsstring[]
= []
rollingDaysinteger
= null
sheetIdstring
= null
{
  "schedule": "daily",
  "recipients": [],
  "rollingDays": null,
  "sheetId": null
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/analytics/reports/{id}/schedule" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"schedule":"daily","recipients":[],"rollingDays":null,"sheetId":null}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "name": "string",
  "query": {
    "kind": "messages",
    "from": "string",
    "to": "string",
    "groupBy": "day",
    "sourceKind": "string",
    "sourceId": "string",
    "channel": "email",
    "includeMachineOpens": true
  },
  "createdAt": "2024-01-01T00:00:00Z",
  "schedule": "daily",
  "recipients": [
    "string"
  ],
  "rollingDays": 0,
  "sheetId": "string",
  "lastSentAt": "2024-01-01T00:00:00Z",
  "ownerId": null,
  "visibility": "shared"
}
Schema
idstringrequired
namestringrequired
queryQueryVariant | QueryVariant2 | QueryVariant3 | QueryVariant4 | QueryVariant5 | QueryVariant6required
createdAtstringrequired
schedulestringrequired
daily | weekly | monthly
recipientsstring[]required
rollingDaysintegerrequired
sheetIdstringrequired
lastSentAtstringrequired
ownerIdstringrequired
= null
visibilitystringrequired
shared | private = shared
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
GEThttps://hermeticor.com/v1/analytics/sheets/status

Code samples

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

Responses

200 Default Response
Example
{
  "configured": true,
  "accountEmail": "string"
}
Schema
configuredbooleanrequired
accountEmailstringrequired
POSThttps://hermeticor.com/v1/analytics/reports/{id}/export-sheet

Write the report into a Google spreadsheet shared with the service account (replaces the tab)

Parameters

idstringpathrequired

Request body

application/json
spreadsheetIdstringrequired
tabstring
= Hermetica
{
  "spreadsheetId": "string",
  "tab": "Hermetica"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/analytics/reports/{id}/export-sheet" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spreadsheetId":"string","tab":"Hermetica"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "updatedRows": 0
}
Schema
updatedRowsintegerrequired
PATCHhttps://hermeticor.com/v1/analytics/reports/{id}/access

Make a report or dashboard private (owner and admins only) or shared with the workspace; only the owner or an admin may change it

Parameters

idstringpathrequired

Request body

application/json
visibilitystringrequired
shared | private
sharedWithstring[]
{
  "visibility": "shared",
  "sharedWith": [
    "string"
  ]
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/analytics/reports/{id}/access" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"visibility":"shared","sharedWith":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "visibility": "shared",
  "ownerId": "string",
  "sharedWith": [
    "string"
  ]
}
Schema
idstringrequired
visibilitystringrequired
shared | private
ownerIdstringrequired
sharedWithstring[]required
PATCHhttps://hermeticor.com/v1/analytics/dashboards/{id}/access

Make a report or dashboard private (owner and admins only) or shared with the workspace; only the owner or an admin may change it

Parameters

idstringpathrequired

Request body

application/json
visibilitystringrequired
shared | private
sharedWithstring[]
{
  "visibility": "shared",
  "sharedWith": [
    "string"
  ]
}

Code samples

cURL
curl -X PATCH "https://hermeticor.com/v1/analytics/dashboards/{id}/access" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"visibility":"shared","sharedWith":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

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

Opens or clicks by country, email client or device (machine opens excluded unless includeMachine)

Parameters

fromstringqueryrequired
tostringqueryrequired
bystringquery
country | client | device = client
kindstringquery
open | click = open
sourceKindstringquery
sourceIdstringquery
includeMachinestringquery
true | false

Code samples

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

Responses

200 Default Response
Example
{
  "by": "country",
  "kind": "open",
  "rows": [
    {
      "key": "string",
      "events": 0,
      "unique": 0
    }
  ]
}
Schema
bystringrequired
country | client | device
kindstringrequired
open | click
rowsRowsItem[]required
Show child parameters
keystringrequired
eventsintegerrequired
uniqueintegerrequired
GEThttps://hermeticor.com/v1/analytics/engagement/heatmap

Opens or clicks by weekday and hour of day in the given time zone (machine opens excluded unless includeMachine)

Parameters

fromstringqueryrequired
tostringqueryrequired
kindstringquery
open | click = open
timezonestringquery
= UTC
includeMachinestringquery
true | false

Code samples

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

Responses

200 Default Response
Example
{
  "kind": "open",
  "timezone": "string",
  "cells": [
    {
      "weekday": 0,
      "hour": 0,
      "events": 0
    }
  ]
}
Schema
kindstringrequired
open | click
timezonestringrequired
cellsobject[]required
Show child parameters
weekdayintegerrequired
hourintegerrequired
eventsintegerrequired
GEThttps://hermeticor.com/v1/analytics/assets/downloads

Tracked asset links: lifetime hits, plus asset_downloaded events and distinct people in the range

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/assets/downloads?from=<from>&to=<to>" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "linkId": "string",
      "assetId": "string",
      "label": "string",
      "revoked": true,
      "totalHits": 0,
      "recordedDownloads": 0,
      "people": 0
    }
  ],
  "nextCursor": "string"
}
Schema
itemsobject[]required
Show child parameters
linkIdstringrequired
assetIdstringrequired
labelstringrequired
revokedbooleanrequired
totalHitsintegerrequired
recordedDownloadsintegerrequired
peopleintegerrequired
nextCursorstringrequired

Updated