Use * syntax for faster search
Page History
...
Column | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
|
Section |
---|
Overview |
...
Overview
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 If you are uploading assets directly into Beeswax or using VAST 2.0 Wrapper, this article does not apply, as Beeswax handles all click redirection automatically.as the DSP automatically handles click redirection in those cases.
In You must include a click macro in third-party JavaScript ad tags or HTML5 creatives in order , a click macro must be included to track clicks in Beeswax and to serve on Google AdX (and other exchanges requiring click redirects). The Buzz API properly redirect the user to the destination URL. The API and UI automatically detect tags from popular ad serving systems including Doubleclick such as DoubleClick Campaign Manager and Sizmek.
...
For proper click tracking
...
with Flashtalking,
...
additional settings must be enabled by the Flashtalking team
...
.
...
...
How
...
Click Tracking Works
When using the DSP for click tracking, the The {{CLICK_URL}}
macro expands into two parts: the Beeswax is used to generate a URL that includes both the DSP click tracker and the Beeswax the DSP redirect. This URL is from the domain "will have the following structure:
Code Block | ||
---|---|---|
| ||
https://event.bidr.io |
...
/clk?dest=<destination_url> |
- The destination URL must be properly encoded (escaped) for the redirect to work correctly.
- If the ad is served through an exchange that requires a redirect, the destination URL must be
...
- encoded twice.
Example 1:
To properly encode a destination URL, use this format:
Code Block | ||
---|---|---|
| ||
{{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, As an additional complication, some exchanges require a redirect through their exchange as well. In this scenario, Beeswax populates the required exchange macros automatically after "dest=". Thus, the inserted destination URL must be escaped one additional time, and the destination URL will need to be escaped twice [Example 2].Example 2: encoded twice:
Code Block | ||
---|---|---|
| ||
{{CLICK_URL}}https%253A%252F%252Fwww. |
...
DSP.com%252Fprivacy.html |
Beeswax additionally offers The platform also provides an escaped click macro: {{CLICK_URL_ESC}}
. This version is often typically used when the click redirects through your ad server performs an initial redirect before redirecting through Beeswax. The the platform. In this case, the destination URL must be encoded twice in this case [Example 3], and when serving on exchanges that require a redirect through their system, the destination URL will need to be encoded three times [Example 4].Example 3: 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:
Code Block | ||
---|---|---|
| ||
{{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:
Code Block | ||
---|---|---|
| ||
{{CLICK_URL_ESC}}https%25253A%25252F%25252Fwww. |
...
DSP.com%25252Fprivacy.html |
...
Configuring Click Macros in Ad Servers
When using a third-party ad server, you often will insert the {{CLICK_URL}}
or {{CLICK_URL_ESC}}
macro as a value for one of your ad server’s parameters, and you will declare the destination URL in your ad server.
...
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:
- Some ad servers handle URL encoding automatically without any extra work needed.
- Other
...
- ad servers require you to
...
- specify how many times
...
- the URL should be encoded. For example, you might need to specify whether the destination URL should be
...
- encoded once or twice.
- Some ad servers do not offer
...
- URL encoding parameters, and you will
...
- need to manually encode the destination URL using a custom
...
- "for" loop.
...
- Certain ad servers fire
...
- click trackers
...
- in parallel
...
- , which means you
...
- will not need to escape
...
- the URL at all
...
- . In this case, you only need to insert
...
- the DSP click macro
...
- without additional encoding.
To determine how many times to escape your the destination URL, use the {{NUM_DEST_URL_ESCAPES}}
macro (or our {{NUM_DEST_URL_ESC_ESCAPES}} macro, which is incremented by one) to indicate how many times the destination URL should be escaped. The potential values of the {{NUM_DEST_URL_ESCAPES}} macro will be 1 or 2. The potential values of which can be set to 1 or 2) or the {{NUM_DEST_URL_ESC_ESCAPES}}
macro will (which can be set to 2 or 3).
Typically, the :
{{NUM_DEST_URL_ESCAPES}}
...
- is used
...
- with the
{{CLICK_URL}}
macro
...
- .
{{NUM_DEST_URL_ESC_ESCAPES}}
is used
...
- with the
{{CLICK_URL_ESC}}
macro.
...
Note |
---|
It is important to test different combinations of these macros, as there is no one-size-fits-all approach. |
...
Examples of
...
Click Tracking
Here are some scenarios to demonstrate how click tracking works with different ad servers and redirects.
1. Using the {{CLICK_URL}}
...
Macro without an Ad Server
- Before the ad is served: The DSP Prior to the ad being served, the Beeswax click macro expands to an Beeswax URL a URL with a the domain
https://event.bidr.io/
. - Ad is served.
- User clicks on the ad.:
- If the exchange
- does not require a redirect, the user is sent:
- First, through
- the click tracker (https://event.bidr.io/clk
- ).
- Then, to the destination URL
- , which must be encoded once.
- If the exchange
- requires a redirect, the user is sent:
- First, through
- the click tracker (https://event.bidr.io/clk
- ).
- Then, through the exchange
- .
- Finally, to the destination URL
- , which must be encoded twice.
2. Using the {{CLICK_URL_ESC}}
...
Macro with an Ad Server that Redirects First
- Before the ad is served: The DSP click macro (Prior to the ad being served, the Beeswax click macro
{{CLICK_URL_ESC}}
) expands to an escaped Beeswax URL value.Ad is servedescaped DSP URL. - User clicks on the ad.:
- If the exchange
- does not require a redirect, the user is sent:
- First,
- through the ad server
- Second, through https://event.bidr.io/clk so Beeswax can track the click -- The Beeswax URL is escaped 1 time. Lastly
- .
- Then, to the click tracker (which is escaped once).
- Finally, to the destination URL
- (which is escaped twice).
- If the exchange
- requires a redirect, the user is sent:
- First,
- through the ad server
- Second, through https://event.bidr.io/clk so Beeswax can track the click -- The Beeswax URL is escaped 1 time.
- Third, through the exchange -- The Exchange URL is escaped 2 times. Lastly
- .
- Then, to the click tracker (escaped once).
- Next, through the exchange (escaped twice).
- Finally, to the destination URL
- (escaped three times).
3. Using the {{CLICK_URL_ESC}}
...
Macro with an Ad Server that Fires Click Trackers in Parallel (e.g., Sizmek)
- Prior to Before the ad being served, the Beeswax is served: The DSP click macro (
{{CLICK_URL_ESC}}
) expands to an escaped Beeswax URL value.Ad is servedescaped DSP URL. - User clicks on the ad.:
- If the exchange
- does not require a redirect, the user is sent
- directly to the
- destination URL.
- In parallel,
- a click tracker fires from the DSP domain.
- If the exchange
- requires a redirect, the user is sent
- directly to the
- In parallel, an image pixel from domain https://event.bidr.io/clk is fired so Beeswax can track the click -- The Beeswax URL is escaped 1 time. Second in parallel, the image pixel redirects to the exchange -- The Exchange URL is escaped 2 times
- destination URL, while the click tracker fires in parallel, and an additional redirect happens through the exchange.
...
Implementing the DSP Click Macro in Flashtalking Tags
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.
Required Steps
- Insert {{CLICK_URL}} macro into ftClick variable.
- Insert {{NUM_DEST_URL_ESCAPES}} into ftContent variable.
- Flashtalking adds function to encode destination URL once by default, and twice if ftContent equals "2".
- Flashtalking disables ftClick decoding (by default, Flashtalking will decode any URL inserted into ftClick, which causes an error on exchanges that insert an additional redirect).
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.