Ad Count deprecated
When providing ads for a user, it is important to keep track of certain information to support analysis of ad campaigns. It is possible to use functions shipped with the framework of OX Display to send tracking data to an Ad Count middleware.
Configuration
A little configuration on the OX App Suite middleware is needed to activate tracking to Ad Count middleware.
io.ox/display//tracker:
# base url of the API endpoints
url: https://tracker.api.example.com/api/1337133713371337
# enable tracking (default: true if 'url' is not empty)
enabled: true
# the brand to be contained in the tracking data (default: “Default”)
brand: Ads Demo
Events
Currently there are a few default events being tracked and recorded by the tracking middleware. It should be easily possible to implement custom events, as long as the tracking middleware supports it.
All the events are not sent to the tracking middlewre instantly. Instead those are queued over a period of currently 15 seconds and sent to the middleware in one request containing all the events of the past period. Should the middleware fail to accept the request, the events will be enqueued again for the next request.
All events will contain a configurable field brand
, which defaults to “Default”.
Unique user
This event is triggered when the tracking code is loaded, once per login (refreshing the page). The payload of this event is a combination of user id and context id. The tracking middleware will use the payload as a unique identifier to only count this event once in a certain interval. The unique identifier is never to be persisted in any way.
Browser
This event is triggered when the tracking code is loaded, once per login (refreshing the page). The tracking middleware will store information based on the user agent string.
Ads
For each ad space configured, there can be several types of events.
Request
Whenever the HTML code for a certain ad space is inserted into the DOM, as well as when a certain ad space is reloaded, an event with a type Request
will be triggered. The tracking middleware receives the type and the name of the ad space being the source of the event.
Example:
{
"type": "Request",
"space": "io.ox/display/skyscraper",
"brand": "Default"
}
Impression
Another important metric are ad impressions. The availability of this event highly depends on the library of the provider serving the ads. For the default GPT implementation, this event will be tracked, once the library reports a banner to be shown.
Example:
{
"type": "Impression",
"space": "io.ox/display/skyscraper",
"brand": "Default"
}