Follow

What macros do Switch support?

Within the Switch ad server, you will be able to implement the following macros to the tag, this is depending on what placeholders have been implemented by the tag provider. Here is a list of all macros that the Switch ad server are compatible with:

  • {clickurl} - A URL that leads to a 'click' script call being constructed.
  • {logurl} - A non URL encoded constructed call to the logging script
  • {logurl_enc}- A 'urlencode' version of the above
  • {clickurl_enc}- A 'urlencode' version of the above
  • {timestamp} - FPU (floating point time) in units of seconds [using microtime()]
  • {random} - Random number generator used for Cache Busting
  • {bannerid} - The ID of the banner that has been served
  • {zoneid} - The ID of the zone/ad tag that has been served
  • {width}- The width of the ad served
  • {height}- The height of the ad served
  • {websiteid} - The website ID that the Ad Unit is contained within
  • {campaignid} - The campaigns ID that the banner is delivered within
  • {advertiserid}- The advertisers ID that the banner is delivered within
  • {referer} - The referrers ID from the source tag
  • {loc} - Unencoded PageUrl from source tag -  http://anything.example.com/index.php 
  • {pageurl} - Encoded PageUrl from the source tag - http%3A%2F%2Fanything.example.com%2Findex.php 

 You will need to ensure that the appropriate placeholder has been implemented to the tag, via the tag provider, before amending the tag with these macros.