Get Ad Tracking Pixel and ClickURL

Why Get an Ad Tracking Pixel and ClickURL?

You may find it desirable to retrieve the number of tracking clicks for a specific ad, enabling you to measure ad performance. This is especially useful for static text link ads (adTypeId 20) that cannot be normally served by JavaScript ad code or the Decision API.

The Get Ad Tracking Pixel and Click API call will return the StaticClickUrl for tracking clicks with the ad, in addition to an ImpressionPixelUrl for tracking impressions.

📘

Note

Static text links no longer expire and will continue to be live.

The response for this API call returns an object containing the ad ID, the static click url, and the impression pixel URL.

🚧

Caution

The requested ad must be fully distributed to Kevel's ad-delivery systems for a URL to be generated (we only allow URLs for fully published ads). If you receive a 404 error, retry your request after 10 seconds.

If an ad is deactivated (IsActive is set to false), no impression or click URLs can be generated. You will receive the error {"message":"This ad is not active."} if you attempt to generate URLs for an inactive ad.

API Syntax

When using the Get Ad Tracking Pixel and ClickURL API call, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

GET https://api.kevel.co/v1/ad/{AdID}/tracking-urls

Where:

  • GET - the type of API request being made.
  • https://api.kevel.co - the URL for the request.
  • v1 - the API version.
  • ad - the API endpoint being called.
  • AdID - the ID associated with the ad being called.
  • tracking-urls - the tracking URLs associated with the ad.
Path Params
int32
required

The ad ID (or creative flight map). Note that this is not the creative ID.

Query Params
int32
required

The site in your network where the impression and/or click should be tracked. The site must be eligible to serve the ad (i.e. the ad's flight belongs to a channel the site is associated with).

int32

An optional zone where the impression and/or click should be tracked. Must belong to the siteid.

string

A comma separated string of keywords, like foo,bar,baz, that will be tracked in reporting with the click and/or impression. Keywords must not contain disallowed characters defined in the keyword documentation.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json