Querying tracking events
This topic shows how to query track events from Profile Store. Tracked events are used for recording visitor interaction.
Prerequisites
See Tracking API for a better understanding of how tracking works. This topic references Postman for querying and testing of RESTful APIs, you can use other similar tools to get the same result.
How it works
Use the Profile Store API URL for querying tracking events, (not the Tracking API base URL). The format of the request should be {Profile Store API/api/v1.0/trackevents. An Authorization header must be added to the request. The value should be:
epi-single {YOUR PROFILE STORE API KEY}
The trackevents endpoint returns 100 track events if you do not use any query string. Profile Store follows Microsoft REST API Guidelines for supporting $filter, and $orderby.
(https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md)
Using KQL
Below are some examples of KQL Query used to query track events.
Events | where EventType == "product" and CountryCode == "SE" | take 25
This query retrieve the first 25 records of trackevents with EventType equals to "product" and CountryCode equals to "SE".
Events | where EventType == eventType and CountryCode == countryCode | take takeTop
This query contains 3 user-defined parameters: eventType, countryCode and takeTop, which are defined in Parameters property of Event Filter Definition.
Updated almost 3 years ago