Skip to main content
Skip table of contents

The Analytics API

You can find information about how to get credentials for the Analytics API outside the CMS from How to get an interaction log from the Reporting API using Postman.


The authorization mechanism is the same and uses the same credentials, but the request url for the actual interaction log is different and gives a different response.

Request Parameters:

There is a single endpoint (https://analytics.digitalcx.com/:CUSTOMERKEY/projects/:PROJECTKEY/interactions) with parameters that influence the presence of data in two columns and otherwise filter or limit the rows of data returned.

curl:
curl --location 'https://analytics.digitalcx.com/:CUSTOMERKEY/projects/:PROJECTKEY/interactions?culture=&filterText=&paginateData=true&continuationToken=&includeUserinfo=false&interactionTypes=2&sessionMode=&environment=Production&mainInteractionTypes=&activeSessionOnly=true&endDate=&startDate='

Parameter

Required

Description

Type

Notes

culture

required

Case sensitive (usually lower case)

Culture of the project

 

string

 

startDate

required

Start date of the query, allows timestamp

timestamp

(ISO format possible)

 

endDate

required

End date for the query, allows timestamp, exclusive

timestamp

(ISO format possible)

 

filterText

optional

Case sensitive

Filter on interactionValue

string

 

paginateData

optional

Default: false

Allow pagination

If True, the Response header will have continuationToken for the next set of data

boolean

 

continuationToken

optional

Token to continue with pagination

string

 

includeUserInfo

optional

Default: false

Shows column AdditionalSessionInfo and Variables

On false or no rights, shows empty string

boolean

See note (includeUserInfo)

interactionTypes

optional

Default: all

Filters all types of interaction the interaction has (like event triggers dialog → event + dialog)

Binary flag

(int)

See note (Interaction types)

mainInteractionType

optional

Filters the type that started the interaction

binary flag

(int)

See note (Interaction types)

activeSessionOnly

optional

Default: false

Returns only sessions with interaction types that are not only events, dataRetrievals or dialog starts (isActive)

When false active and inactive sessions will be returned

boolean

See note (ActiveSessionOnly)

Environment

optional

Case sensitive

Default: Production

Publish environment

Possible environments:

  • Production

  • Staging

string

 

sessionMode

optional

Case sensitive

Default: Public

Possible session modes:

  • Public

  • Internal

  • Test

  • Monitor

string

See note (SessionMode)

 

Notes on Parameters

ActiveSessionOnly

An ‘Active Session’ is defined as a session containing interactions of types other than Events, DataRetrievals or the starts of Dialogs.
Having this as a filter helps you only retrieve actually interesting data instead of a lot of ‘'irrelevant’' Events.

Interaction types

Interaction type filter:

  • Event: 1

  • QA: 2

  • QA and Event: 3

  • FaqClick: 4

  • Dialog: 8

  • LinkClick: 16

  • Feedback: 32

  • FaqSearch: 64

  • TransactionalDialog: 128

  • DataRetrieval: 256

  • GenerativeAI: 512

  • All: All

A combination of any would mean an overlap, not exact match

Example: Interactiontypes: 131 would return interaction with types that are event or QA or TDialog

The InteractionTypes filter queries on the allinteractiontypes column. MainInteractionType queries the mainInteractiontype  column; the type that was the most relevant to that interaction from a recognition perspective.

If you wish to retrieve all interactions of a particular type, use the InteractionTypes filter. If you wish to retrieve all interactions of a given type where the interactiontype is the one used for recognition, use MainInteractionType. This is mainly an important distinction for (Transactional) Dialogs started by other interactions

The interactiontypes this makes the most difference for are Dialogs, Transactional Dialogs, Events and DataRetrievals. GenerativeAI interactions will usual have Q&A as the maininteractiontype. However, interactions with HALO agents may have GenerativeAI as the maininteractiontype. For Q&A, FAQClicks, FAQSearches, Linkclicks and Feedback both filters should give the same results.

DataRetrievals were not available for download in the older interactionlogs. The are used to determine a total (including inactive) sessioncount and to estimate which FAQs were shown how often. In dashboards that do not report on these numbers, DataRetrievals are also not used.

SessionMode

Possible session modes:

  • Public (Default)

  • Internal

  • Test  (Interactions to the Staging engine should have this Session Mode)

  • Monitor

IncludeUserInfo

Additional_sessioninfo and variables (or other columns later) have some potentially sensitive details.
These columns will only be included when specifically requested and with the correct user roles (admin or content engineer) to be able to see the relevant columns.

Limitations on the request

  • You cannot request a date more than 90 days back and no data is available prior to December 15th 2024

  • You cannot request more than one day’s worth of data at the same time

  • ContinuationToken will be in the response header with continuationToken as key

  • Returns a csv.

  • When the user does not have enough rights or includeUserInfo: false was set, additional_sessioninfo and variables will be empty strings

 

 

Response

Content type: text/csv

If the accept header "accept", "application/json" is passed along in the request the response will be in JSON.

Possible headers: continuationToken: string

For returned columns, see: Interaction Logs from the Analytics API


Error and Status Codes

Status code

Message

Meaning

200

(CSV in the body)

Successful with data in the body

204

 

No more data can be found with the given continuation token.

Only happens with pagination

400

"End date cannot be earlier than start date."

startDate is larger than endDate, consider swapping the values with each other and try again

400

"Customer key {customerKey} with project {projectKey} does not exist."

The given customer key and/or the project key does not exist or the user has no access to it.

403

 

Forbidden

500

"Something went wrong"

An internal error occurred.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.