Capture customer activity
Overview
Use this endpoint to capture a customer's activity throughout a session. A variety of event types are available which can be used to model specific interactions by the customer, such as interacting with an offer, denoting an impression from an Ad, or browsing their customer profile.
Important
Some event types also require a metadata object to be provided in order to accurately represent the behavior being modeled. It is up to you to ensure your application correctly captures the right metadata, depending on the event being sent.
NEED TO FIX THESE LINKS: See the examples below, as well as the ClientEventMessage and ClientEventMetadata type definitions, for more information.
1 |
|
Input Parameters
Property | Type | Required | Description |
---|---|---|---|
clientEvents | ClientEventMessage[] | Required | A list of client event messages |
Output
This endpoint returns an HTTP response indicating success or failure.
Examples
Logging a viewable impression event
In this example, a customer's ad impression is being logged.
Once processed, this event would transition the ad's visibility state relative to the customer from NEW
to SERVED
.
The ad is the third element in its category, so a zero-indexed displayPosition
of 2
is logged.
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Activating an offer
In this example, a customer has engaged with the offer attached to an ad.
Once processed, this event would transition the ad's state relative to the customer from SERVED
to ACTIVATED
.
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Hiding offers
In this example, a customer has indicated that they are not interested in seeing a particular offer. Once the event is processed, the ad will no longer be returned to the user in subsequent Get Ads calls.
Submitting an UnParkOffer
event would allow the offer to be again.
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Logging other client activity
This example shows a client event indicating that a user has logged into their banking app, expanded a redemption in their customer profile, and clicked a link in their reward summary.
1 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
Example Response
1 2 3 |
|