|
This article explains how to track clicks when using third-party JavaScript ad tags or HTML5 creatives. It does not apply to ads uploaded directly into the platform or through a VAST 2.0 Wrapper, as the DSP automatically handles click redirection in those cases.
In third-party ad tags, a click macro must be included to track clicks and properly redirect the user to the destination URL. The API and UI automatically detect tags from popular ad serving systems such as DoubleClick Campaign Manager and Sizmek.
For proper click tracking with Flashtalking, additional settings must be enabled by the Flashtalking team.
When using the DSP for click tracking, the {{CLICK_URL}}
macro is used to generate a URL that includes both the DSP click tracker and the DSP redirect. This URL will have the following structure:
https://event.bidr.io/clk?dest=<destination_url> |
Example 1:
To properly encode a destination URL, use this format:
{{CLICK_URL}}https%3A%2F%2Fwww.DSP.com%2Fprivacy.html |
Some exchanges require additional redirects, which means the destination URL will need to be escaped a second time.
Example 2:
If the exchange requires an extra redirect, the destination URL will need to be encoded twice:
{{CLICK_URL}}https%253A%252F%252Fwww.DSP.com%252Fprivacy.html |
The platform also provides an escaped click macro: {{CLICK_URL_ESC}}
. This is typically used when the ad server performs an initial redirect before redirecting through the platform. In this case, the destination URL must be encoded twice or even three times, depending on the exchange's requirements.
Example 3:
For a redirect through an ad server, the URL should be encoded twice:
{{CLICK_URL_ESC}}https%253A%252F%252Fwww.DSP.com%252Fprivacy.html |
Example 4:
If the exchange requires additional redirects, encode the destination URL three times:
{{CLICK_URL_ESC}}https%25253A%25252F%25252Fwww.DSP.com%25252Fprivacy.html |
When using a third-party ad server, the {{CLICK_URL}}
or {{CLICK_URL_ESC}}
macro is inserted into the appropriate parameter of the ad server's tag. The destination URL is declared within the ad server as well.
Ad servers handle URL encoding in different ways:
To determine how many times to escape the destination URL, use the {{NUM_DEST_URL_ESCAPES}}
macro (which can be set to 1 or 2) or the {{NUM_DEST_URL_ESC_ESCAPES}}
macro (which can be set to 2 or 3).
Typically:
{{NUM_DEST_URL_ESCAPES}}
is used with the {{CLICK_URL}}
macro.{{NUM_DEST_URL_ESC_ESCAPES}}
is used with the {{CLICK_URL_ESC}}
macro.It is important to test different combinations of these macros, as there is no one-size-fits-all approach. |
Here are some scenarios to demonstrate how click tracking works with different ad servers and redirects.
{{CLICK_URL}}
Macro without an Ad Serverhttps://event.bidr.io/
.{{CLICK_URL_ESC}}
Macro with an Ad Server that Redirects First{{CLICK_URL_ESC}}
) expands to an escaped DSP URL.{{CLICK_URL_ESC}}
Macro with an Ad Server that Fires Click Trackers in Parallel (e.g., Sizmek){{CLICK_URL_ESC}}
) expands to an escaped DSP URL.In order for clicks to track properly in both Flashtalking and reporting, a few changes need to be made. The DSP's click macros need to be inserted into the ad tag, and Flashtalking needs to ensure they've properly configured their URL-encoding logic.
Steps 3 and 4 above require submitting a request to the Flashtalking team.
For any questions on this process or to verify that it’s been done correctly, please reach out to Support.