Page tree
Skip to end of metadata
Go to start of metadata

The Revive Adserver software supports a number of macros. These are placeholders that can be placed into the content of an HTML banner or in a banner's destination URL. When the banner is delivered (displayed), these macros will be replaced with the corresponding value in real time.

Below is a list of the macros currently supported by the Revive Adserver software.

MacroDescription
{clickurl}Substituted by the click tracking URL for the delivered ad
example: https://…/delivery/ck.php?oaparams=2__bannerid=…
{timestamp}Substituted by a decimal string based on the current timestamp
example: 1185290310.72
{random}Substituted by a 10 character alpha-numeric random string value
example: b616f31e72
{logurl} *Substituted by an impression logging URL
example: https://…/delivery/lg.php?bannerid=…
{logurl_enc} *Substituted by the url-encoded impression logging URL
example: https%3A%2F%2F…%2Fdelivery%2Flg.php%3Fbannerid%3D…
{target}Substituted by the target value for the selected banner
example: _blank
{url_prefix}Substituted by the base delivery URI of installation
example: https://.../www/delivery
{bannerid}Substituted by the ID of the selected banner
example: 123
{zoneid}Substituted by the ID of the selected zone
example: 456
{source}Substituted by the value of “source=” as passed into the ad-request from the site tags
example: source=cat123/cat456…
{pageurl}Substituted by the URL of the page the ad was requested on (url encoded)
example: https%3A%2F%2Flocalhost%2Fmagic_macros%2Ftest.html
{referer}Substituted by the referrer of the page the ad was requested on (url encoded)
example: https%3A%2F%2Flocalhost%2Fmagic_macros%2F
{width}Substituted by the width (in pixels) of the selected ad
example: 468
{height}Substituted by the height (in pixels) of the selected ad
example: 60
{clickurlparams}Substituted by the parameters which would be passed to the {clickurl}
example: 2__bannerid=X__zoneid=Y__source=cat123/cat456__cb=0d9139d879__maxdest=
{ANY_INPUT_VARIABLE}Substituted by any value present in the php $_REQUEST array ($_GET/$_POST/$_COOKIE)
example: {OAID} -> $_COOKIE[‘OAID’] = 1fd819ffc7267757ba681ff5daa3007e

If any of the magic macros are present in the HTML, but the value cannot be found, then the replaced value depends on the type of macro:

  • For core macros ending in id – The value zero is used
  • For other core macros – An empty string is used
  • For “ANY_INPUT_VARIABLE” macros – The macro string is left unchanged in the HTML

If either {logurl} or {logurl_enc} are detected in an HTML ad,  Revive AdServer will not log an impression, but will pass the logging URL on to a 3rd party and rely on them to call-back using the logurl provided.

URL Macros

Some special considerations for macros related to ad server URLs.

The {clickurl} macro

By inserting the {clickurl} macro into the banner HTML for an ad stored on a third party server,  Revive Adserver can track clicks on that ad.

When the ad is clicked,  Revive Adserver substitutes the click tracking URL for the macro, for example: https://.../delivery/ck.php?oaparams=2__bannerid=.... The browser is redirected to this URL where Revive Adserver counts the click and then forwards the browser to the actual destination URL.

{clickurlparams}

The {clickurlparams} are the parameters that are passed to the {clickurl} address for third party click tracking. These parameters are:

  • bannerid
  • zoneid
  • source
  • cb
  • maxdest

{pageurl}

The URL of the page that requested the ad (url-encoded), for example: https%3A%2F%2Flocalhost%2Fmagic_macros%2Ftest.html

{logurl}

To track impressions for third party ads, use the {logurl} macro. When the ad is displayed, Revive Adserver substitutes the impression logging URL for the macro, for example http://.../delivery/lg.php?bannerid=.... The browser is redirected to this URL where  Revive AdServer (Formerly OpenX Source) logs the impression and then forwards the browser to the ad. As with the {clickurl} macro,  Revive AdServer (Formerly OpenX Source) appends various parameters for the ad to the URL and passes these to the impression logging page.

{logurl_enc}

The {logurl_enc} macro is similar to the {logurl} macro but the substituted URL is url-encoded, for example: https%3A%2F%2F...%2Fdelivery%2Flg.php%3Fbannerid%3D....

{url_prefix}

The URL to the base of the Revive Adserver delivery server, for example https://ads.example.com/www/delivery


  • No labels