1. Click tracking for AdSpirit placement codes (Iframe + synchronous scripts)
Example iFrame:
-
IFrame URL as it is given to the publisher ad server:
<iframe width="120" height="600" noresize="noresize" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" src="http://xyz.adspirit.de/adframe.php?pid=35&ord=[timestamp]"
ALLOWTRANSPARENCY="true"> ... </iframe> -
Code after the adjustment:
<iframe width="120" height="600" noresize="noresize" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"src="http://xyz.adspirit.de/adframe.php?pid=35&ord=[timestamp]&prdclick_1={PublisherMACRO}" ALLOWTRANSPARENCY="true"> ... </iframe>
-
Code after replacing the {PublisherMACRO} :
<iframe width="120" height="600" noresize="noresize" scrolling="no" frameborder="0" marginheight="0" marginwidth="0"src="http://xyz.adspirit.de/adframe.php?pid=35&ord=[timestamp]&prdclick_1=http%3A%2F%2Fwww.tracker.de %2Ftrack.php%3F" ALLOWTRANSPARENCY="true"> ... </iframe>
-
By clicking will be forwarded to:
http://www.tracker.de/track.php?http%3A%2F%2http://xyz.adspirit.de%2Fadclick.php%3Fpid=35¶meter...
-
Track.php must then in turn forward to:
http://xyz.adspirit.de/adclick.php?pid=35&weitereparameter...
Example script code:
-
Script code as it is given to the publisher ad server:
<script src="http://xyz.adspirit.de/adscript.php?pid=73&ord=[timestamp]" type="text/javascript"></script>
-
Code after the adjustment:
<script src="http://xyz.adspirit.de/adscript.php?pid=73&ord=[timestamp]&prdclick_1={PublisherMACRO}" type="text/javascript"></script>
-
Code after replacing the {PublisherMACRO} :
<script src="http://xyz.adspirit.de/adscript.php?pid=73&ord=[timestamp]&prdclick_1=http%3A%2F%2Fwww.tracker.de %2Ftrack.php%3F" type="text/javascript"></script>
-
A click will be forwarded to:
http://www.tracker.de/track.php?http%3A%2F%2http://xyz.adspirit.de%2Fadclick.php%3Fpid=35¶meter...
-
Track.php must then in turn forward to:
http://xyz.adspirit.de/adclick.php?pid=35&weitereparameter...
Encoding:
Example:
&prdclick_0= | URL not coded |
&prdclick_1= | URL coded once |
&prdclick_2= | URL encoded twice |
&prdclick_3= | coded URL three times |
2. Click tracking for AdSpirit placement codes (asynchronous scripts)
In order to track clicks for async. script codes from AdSpirit, two attributes need to be inserted in the <ins ...> element: data-asm-click="..." and data-asm-encode="...". As the value of data-asm-click, please enter the click-through URL (not encoded). The attribut data-asm-encode="X" is used, in order to control how often the redirect URL is encoded (default is 0).
Beispiel:
-
Code before adjustments
<ins class="asm_async_creative"
style="display:inline-block; width:160px; height:600px;"
data-asm-host="meinadserver.adspirit.de"
data-asm-params="pid=123"></ins>
<script src="http://meinadserver.adspirit.de/adasync.js" async type="text/javascript" language="JavaScript"></script> -
Code after adjustments
http://www.tracker.de/track.php is just an example of what your click macro might look like. Please enter the click macro of your AdServer here to count the clicks.
<ins class="asm_async_creative"
style="display:inline-block; width:160px; height:600px;"
data-asm-click="{PublisherMACRO}"
data-asm-encode="1"
data-asm-host="meinadserver.adspirit.de"
data-asm-params="pid=123"></ins>
<script src="http://meinadserver.adspirit.de/adasync.js" async type="text/javascript" language="JavaScript"></script> -
Code nach dem Ersetzen des {PublisherMACRO}:
<ins class="asm_async_creative"
style="display:inline-block; width:160px; height:600px;"
data-asm-click="http://www.tracker.de/track.php"
data-asm-encode="1"
data-asm-host="meinadserver.adspirit.de"
data-asm-params="pid=123"></ins>
<script src="http://meinadserver.adspirit.de/adasync.js" async type="text/javascript" language="JavaScript"></script> -
A click will be forwarded to (note 1 encoding in the example above):
http://www.tracker.de/track.php?http%3A%2F%2http://xyz.adspirit.de%2Fadclick.php%3Fpid=35¶meter... -
Track.php must then in turn forward to:
http://xyz.adspirit.de/adclick.php?pid=35&weitereparameter...
3. Real-Time Bidding
As with normal IFrames / script code can also be done in real-time bidding click tracking. For this purpose, the RTB request URL, the corresponding parameter &prdclick_0= / &prdclick_1= / ... (see above) hang reasonable.
As this is the RTB to the forwarding of the advertisement and not a direct delivery to the user, may be here instead of the click-through URL and the click Macro (url-encoded) of the respective ad server are appended
(eg. &prdclick_0=%25%25CLICK_URL_ESC%25%25 bei DoubleClick).