Tracking
Getting tracking right is a fundamental pre-requisite for Kleio to optimize auctions and thereby your ad revenue.
There are two events to be tracked: impressions and conversions.
Impressions
The definition of an impression is fairly straightforward. Think of it as an ad having been shown to a user and the user having had the chance to interact with it.
You can either track impressions directly when you render the ad or sponsored product, or if you have a more sophisticated setup that accounts for viewable impressions (i.e. the ad was seen and visible on screen) then you might want to define this to be viewable impressions.
Conversions
The definition of conversion is less straightforward. In essence, it is the event whatever event that makes you deem the ad as having been successful. In an e-commerce setting, you might consider an "add-to-cart" event to be a conversion. Or you might consider any sort of interaction with an ad to be a conversion. Or if what you are selling is impressions, then the act of having shown the ad should trigger a conversion event.
Why tracking is important
Getting tracking right directly influences the behavior of the auction system. Kleio tracks the ratio of conversions to impressions for each ad and product. Based on this ratio we calculate an estimated revenue per impressions for each ad, which in turn is what is used during the auction. This allows a well-performing ad with a low maximum bid to compete on an even footing with a poorly performing ad with a high maximum bid, and in turn, is designed to optimize the amount of revenue you might derive from the system. This mechanism only works as long as you ensure the tracking is correct.
Tracking code
Ads that are returned by the auction API endpoint include a tracking_code
. The code itself encodes sufficient metadata for Kleio to later reconstruct which ad and which auction the code belongs to, and at what price the auction was won.
When using the tracking endpoints described below, the tracking_code
is what should be passed in as the :tracking_code
-property.
Properties
- Name
tracking_code
- Type
- string
- Description
A string encoding various properties for Kleio to identify which auction and which ad is being tracked. The format of the code itself is not part of the public API and we strongly advise against trying to read, alter, or manually construct, tracking codes.
Track an impression
This endpoint allows you to track an impression. Please see the description above for more information on how to think about impressions and when to track them.
Required attribute
- Name
tracking_code
- Type
- string
- Description
The
tracking_code
that was returned alongside the ad from the auction API-endpoint.
Request
curl -X POST \
https://example.com/api/v1/track/impression/ueRPvrlZ2KnHRHN5vN0VIfnd0maDHONIqH8pAxXZjCkAWbBfPBOXQTWeMs3OX_F3NpyG7Mf1q0aSnhEbl6r0KKIAAAAAAAAAZQAAAABlTiSn
An empty response body will be returned.
Track a conversion
This endpoint allows you to track a conversion. Please see the description above for more information on how to think about conversions and when to track them.
Required attribute
- Name
tracking_code
- Type
- string
- Description
The
tracking_code
that was returned alongside the ad from the auction API-endpoint.
Request
curl -X POST \
https://example.com/api/v1/track/conversion/ueRPvrlZ2KnHRHN5vN0VIfnd0maDHONIqH8pAxXZjCkAWbBfPBOXQTWeMs3OX_F3NpyG7Mf1q0aSnhEbl6r0KKIAAAAAAAAAZQAAAABlTiSn
An empty response body will be returned.