Managing clickthrough URLs are an important part of building your ad campaigns. In this article, we discuss the different configurations supported by TweenUI.

The clickthrough URL is simply the URL that should be loaded when a user click on your banner ad. There are a few ways to specify and handle clickthrough URLs within TweenUI. The simplest option is to set the clickthrough URL directly inside the editor (under File->Settings) while you’re building your banner. This way, the URL will be a hard-coded part of the banner when you later publish it.

When you publish a banner ad you will get a short snippet of code called ad tags or the embed script. This is the code snippet your share with parties who should traffic your ad, and it looks similar to this:

<script id="tui-spmn">
(function(t){t.spmn={
"cid":"46501524-b7b1-44ae-8342-9cdfcd0b9700",
"pid":"d96e410a-eb8a-47e8-9501-8ee8cae84c17",
"width":"500",
"height":"90"
}}(window.tweenui=window.tweenui||{}));</script>
<script src="https://s3-eu-west-1.amazonaws.com/display.tweenui.com/s.js" async></script>

Embedding the snippet above in a webpage results in:


In the example above, the URL “https://tweenui.com/this-url-was-hard-coded” was set as the clickthrough url in the ad editor under File->Settings. Many times however, more flexibility than that is needed.

You can configure the clickthrough URL directly in the ad tags by adding a new parameter called “link”. For instance, if you wanted the clickthrough URL for this banner ad to be http://tweenui.com/my-landing-page, this is how you would add the link parameter (don’t miss the trailing comma):

<script id="tui-spmn">
(function(t){t.spmn={
"link":"http://tweenui.com/my-landing-page",
"cid":"46501524-b7b1-44ae-8342-9cdfcd0b9700",
"pid":"d96e410a-eb8a-47e8-9501-8ee8cae84c17",
"width":"500",
"height":"90"
}}(window.tweenui=window.tweenui||{}));</script>
<script src="https://s3-eu-west-1.amazonaws.com/display.tweenui.com/s.js" async></script>

The snippet above gives this result:


You can also use the link parameter to insert click macros into the ad tags. Let’s say you have a publisher who has the following click macro: %%CLICK_URL%%. To support this macro, set the macro as the value of the link parameter in the ad tags:

<script id="tui-spmn">
(function(t){t.spmn={
"link":"%%CLICK_URL%%",
"cid":"46501524-b7b1-44ae-8342-9cdfcd0b9700",
"pid":"d96e410a-eb8a-47e8-9501-8ee8cae84c17",
"width":"500",
"height":"90"
}}(window.tweenui=window.tweenui||{}));</script>
<script src="https://s3-eu-west-1.amazonaws.com/display.tweenui.com/s.js" async></script>

Adding a link parameter to the ad tags will normally override any clickthrough URL that was hard coded in the banner. But some platforms use a slightly different setup and require that the final destination URL is provided by the banner and appended to the end of a clickthrough URL. For instance, some platforms will use a click macro to insert a clickthrough URL that may look similar to this:

http://ad-platform.com/banner-id/123/click?dest=

Here, it is required that the destination URL is appended at the end of the clickthrough URL. Adding a new parameter to the ad tags will help us with this use case.

This parameter is called append_ct and can only be used together with the link parameter. Adding the append_ct parameter will cause any originally hard coded clickthrough URL to be appended to the URL specified by the link parameter. This is how the ad tags will look:

<script id="tui-spmn">
(function(t){t.spmn={
"link":"http://tweenui.com/banner/123/click-counter?dest=",
"append_ct":1,
"cid":"46501524-b7b1-44ae-8342-9cdfcd0b9700",
"pid":"d96e410a-eb8a-47e8-9501-8ee8cae84c17",
"width":"500",
"height":"90"
}}(window.tweenui=window.tweenui||{}));</script>
<script src="https://s3-eu-west-1.amazonaws.com/display.tweenui.com/s.js" async></script>

And the result is below:


The clickthrough URL set in the TweenUI editor “https://tweenui.com/this-url-was-hard-coded” is now appended to the end of the URL specified by the link parameter “http://tweenui.com/banner/123/click-counter?dest=”.