Help Center Manage Your Account Ad Tag

How do I pass custom data and variables into the ad?

You can pass a custom value into the ad tag and our ad server will pass that value along to the actual ad. This is useful when the ad displays dynamic content based on certain input. The setup can also be used for custom reporting and tracking purposes. For example, an ad displays today's interest rate for a mortgage loan that needs the actual interest rate supplied from outside.

Setup

  1. Append "&custom=Your+Ad+Data" to the serving code. You can append the variable manually or enter it into Custom Parameters field when generating the serving code
  2. Add the tag/macro {AS:Serving:Custom} (or {AS:Serving:CustomEncoded} for URL-encoded value) into the ad at the location where you want the actual data to be replaced.

Example - Dynamic Interest Rate

You want to display an ad that shows the best mortgage rate for a 30-year loan in a certain city.
  1. The serving code has these pass-along parameters:
    &custom=Gilroy&custom1=4.25
  2. The ad has these custom-data macros inside its ad copy:
    Need a 30-year loan in {AS:Serving:Custom}? 
    Today's best rate is {AS:Serving:Custom1}% APR
  3. When this ad is served, our ad engine will replace the macro {AS:Serving:Custom} with the value of "&custom=4.25" supplied from the serving code. The result ad would display:
    Need a 30-year loan in Gilroy? 
    Today's best rate is 4.25% APR

Example - Cruise Line with Destination

In this example, you want to customize a travel cruise ad with the destination and the cruise line. The two custom parameters will be supplied to the serving code and they will be passed along to the ad tag, which could be a third-party URL, a landing page URL, a custom image URL, or some HTML code in a Rich-Media ad.
  1. Pass this into the ad request:
    ad.php?...&custom=Panama&custom1=Norwegian
  2. Edit the ad's click URL with the pass-along/custom parameters:
    landing.page/cruise?destination={AS:Serving:Custom}&company={AS:Serving:Custom1}
  3. The actual landing page for this ad would become:
    landing.page/cruise?destination=Panama&company=Norwegian

Available Pass-Along Parameters

You can have up to ten (10) custom params:
  • custom => {AS:Serving:Custom} and {AS:Serving:CustomEncoded}
  • custom1 => {AS:Serving:Custom1} and {AS:Serving:CustomEncoded1}
  • custom2 => {AS:Serving:Custom2} and {AS:Serving:CustomEncoded2}
  • custom3 => {AS:Serving:Custom3} and {AS:Serving:CustomEncoded3}
  • custom4 => {AS:Serving:Custom4} and {AS:Serving:CustomEncoded4}
  • custom5 => {AS:Serving:Custom5} and {AS:Serving:CustomEncoded5}
  • custom6 => {AS:Serving:Custom6} and {AS:Serving:CustomEncoded6}
  • custom7 => {AS:Serving:Custom7} and {AS:Serving:CustomEncoded7}
  • custom8 => {AS:Serving:Custom8} and {AS:Serving:CustomEncoded8}
  • custom9 => {AS:Serving:Custom9} and {AS:Serving:CustomEncoded9}

VAST Video Ad

Pass-along parameters are also commonly used for video ads. A VAST-wrapper ad chain goes through multiple video ad servers. In order to select the right ad, a video ad server often needs data from the upstream ad server or from the publisher/website. To do that, those bits of information (video title, video description, keywords, etc.) are passed along via ad macros from one ad server to another ad server.

Other Articles in Ad Tag

This section describes the ad tag (serving code) with basic and advanced settings. It includes common ad serving setup instructions and answers frequently asked questions when integrating the ad tag into your site, blog or app.

Cannot find an answer for your question? Ask our Customer Care team

Related