Tag Variables

Passing variable values to Invocation tags.

Revive Adserver's Site - Variable delivery rule allows banners to be targeted to named variable values. 

The table below shows the different way to pass in a named variable (userType) and value (premiumUser) by invocation tag type.

Changes from the default tag are highlighted in bold red.

Naturally, more than one variable may be passed into Revive Adserver via the same method - simply add more named variable/value pairs to the invocation tag as required.



 

Tag TypeVariable in Invocation Tag Example

Asynchronous JS

<ins data-revive-zoneid="1" data-revive-userType="premiumUser" data-revive-id="9689241d68f3bd2ccf2f346d74a3abaa"></ins>
<script async src="//revive-adserver.example.com/www/delivery/asyncjs.php"></script>

(warning) Please see https://github.com/revive-adserver/revive-adserver/issues/994

JavaScript

<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://revive-adserver.example.com/www/delivery/ajs.php':'http://revive-adserver.example.com/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=1");
document.write ('&amp;userType=premiumUser');
document.write ('&amp;cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
document.write ("&amp;loc=" + escape(window.location));
if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://revive-adserver.example.com/www/delivery/ck.php?n=acb33d8b&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://revive-adserver.example.com/www/delivery/avw.php?zoneid=1&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=acb33d8b' border='0' alt='' /></a></noscript>

Single Page Call

<script type='text/javascript' src='http://revive-adserver.example.com/www/delivery/spcjs.php?id=1&amp;userType=premiumUser'></script>

(warning) Only the header script part needs to be modified for Single Page Call invocation.

iFrame

<iframe id='a1432daa' name='a1432daa' src='http://revive-adserver.example.com/www/delivery/afr.php?zoneid=1&amp;userType=premiumUser&amp;cb=INSERT_RANDOM_NUMBER_HERE' frameborder='0' scrolling='no' width='468' height='60'><a href='http://revive-adserver.example.com/www/delivery/ck.php?n=a6964f39&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://revive-adserver.example.com/www/delivery/avw.php?zoneid=1&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a6964f39' border='0' alt='' /></a></iframe>

Local Mode

<?php

  $_REQUEST['userType'] = 'premiumUser';

  define('MAX_PATH', '/path/to/revive-adserver');
  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    }
    $phpAds_raw = view_local('', 1, 0, 0, '', '', '0', $phpAds_context, '');
  }
  echo $phpAds_raw['html'];
?>

XML-RPC

(warning) Not supported.

Image

<a href='http://revive-adserver.example.com/www/delivery/ck.php?n=a744f791&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://revive-adserver.example.com/www/delivery/avw.php?zoneid=1&amp;userType=premiumUser&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a744f791' border='0' alt='' /></a>

No Cookie Image

<a href='http://revive-adserver.example.com/www/delivery/ck.php?zoneid=2' target='_blank'><img src='http://revive-adserver.example.com/www/delivery/avw.php?zoneid=2&amp;userType=premiumUser&amp;cb=INSERT_RANDOM_NUMBER_HERE' border='0' alt='' /></a>

Interstitial or Floating DHTML

<script type='text/javascript'><!--//<![CDATA[
var ox_u = 'http://revive-adserver.example.com/www/delivery/al.php?zoneid=4&userType=premiumUser&layerstyle=geocities&align=right&padding=2&closetext=%5BClose%5D';
if (document.context) ox_u += '&context=' + escape(document.context);
document.write("<scr"+"ipt type='text/javascript' src='" + ox_u + "'></scr"+"ipt>");
//]]>--></script> 

Popup

<script type='text/javascript' src='http://revive-adserver.example.com/www/delivery/apu.php?n=&zoneid=3&amp;userType=premiumUser'></script>