Click tracking URL encoding

A common issue with the encoding of click tracking URLs is that click URL parameters are cut off. This article explains how to fix the issue. It is relevant when you use:

  • Smart AdServer's ad tags in third party systems (e. g. a Smart AdServer Agency tag in a publisher system/ad server)
  • Smart AdServer's ad tags from one network in another network (e. g. a Smart AdServer Agency tag in a Smart AdServer publisher network)

Agency tag formats

There are 3 agency tag formats.

Agency

  • available in Smart AdServer's publisher solution in menu Administration > Websites & Pages > Tags
  • used for RTB+ standalone or in any other third party system
  • does not call an insertion directly but selects and delivers the appropriate insertion depending on its priority and targeting criteria

Example

<script type="text/javascript" src="http://www5.smartadserver.com/ac?out=js&nwid=620&siteid=149676&pgname=my_page&fmtid=53135&tgt=[sas_target]&visit=m&tmstp=[timestamp]&clcturl=[countgo]"></script>

Direct call tags

  • available in Smart AdServer's publisher solution on Campaign level
  • the ad tag calls the insertion directly (no selection of insertions based on priority etc.); e. g. see in example below: it calls insertion ID 6109308 (insid=6109308)

Example

<script type="text/javascript" src="http://diff.smartadserver.com/ac?pgid=415762&insid=6109308&tmstp=[timestamp]&out=js&clcturl=[countgoEncoded]"></script>

Agency tags

  • available in Smart AdServer's agency solution on Campaign level
  • one ad tag per insertion
  • the ad tag calls the insertion directly

Example

<script type="text/javascript" src="http://www3.smartadserver.com/ac?pgid=609289&insid=5138306&tmstp=[timestamp]&out=js&clcturl=[countgoEncoded]"></script>

Parameter clctenc

Encoding the parameters appended to the click tracking URL is required to work with some other adservers. Otherwise, you may get broken (cut off) URLs.

To manage the encoding, the parameter clctenc= must be added to the parameters of the agency tag.

The parameter indicates the number of times that Smart AdServer's click URL must be encoded before appending it to the click tracking URL. For instance, clctenc=2 means that the click URL is encoded twice.

Example

<script type="text/javascript" src="http://www3.smartadserver.com/ac?pgid=609289&insid=5138306&tmstp=[timestamp]&out=js&clcturl=[countgoEncoded]&clctenc=2"></script>

Allowed values of the clctenc parameter are 0, 1, 2 or 3. The default is 0.

When using a Smart AdServer Agency tag in a Smart AdServer insertion ("Smart to Smart"), you must append clctenc=1.

Example

<script type="text/javascript" src="http://www3.smartadserver.com/ac?pgid=609289&insid=5138306&tmstp=[timestamp]&out=js&clcturl=[countgoEncoded]&clctenc=1"></script>

Example

This example uses

With a default encoding level of zero (clctenc=0), Smart AdServer would generate the following URL: http://some.adserver.com/click?url=http://www.google.fr/search?n=10&q=test

With an encoding level of one (clctenc=1), Smart AdServer would generate the following URL: http://some.adserver.com/click?url=http%3a%2f%2fwww.google.fr%2fsearch%3fn%3d10%26q%3dtest

Depending on the implementation of the 3rd party ad server, only one of these URLs may be recognized correctly.

If the third party ad server strictly follows the usual scheme for encoding the query string of URLs, the two URLs above would be analyzed as follows:

If the third party ad server considers whatever follows its "url=" parameter to be a valid URL, the two URLs above would be analyzed as follows:

Note that some third party ad servers recognize both forms of URLs and do not directly fall in one or the other behavior.

Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk