Page tree


A UAS Ad Tag is a simple piece of JavaScript code that you integrate into your webpage.


Once you've generated the Ad Tag you can place it on your website. If your ad unit contains multiple types (for example, Banner, Rich Media, Native, or Video), you can generate a tag for an individual type, or for all types at once:


  1. Select Inventory > Ad Units from the main navigation.
  2. Select Generate Ad Tag from the Actions column for the applicable ad unit from the list, OR
    use the  button from the detail view of an individual ad unit.
  3. Check the box for each type of ad tag you want to generate, then click Copy or Copy All Ad Tags to copy the code to the clipboard.
  4. Insert the copied code into the section of your website source based on the ad types below:
  • Banner/Rich Media:
    • Paste Head Tag in the Header.
    • Paste Body Tag in the Body of the page where you want the ad to appear.
  • Native:
    • Paste the Tag where you want the ad to appear.
  • Video
    • Paste the Video Code where you want the video ad to appear.

Secured and Unsecured Ad Tags

SSL (Secure Sockets Layer) is a standard security protocol to encrypt communication between a web server and a client web browser. SSL technology ensures that all data transmitted between the web server and browser remains private and secure.


You can generate secured (SSL) or unsecured ad tags based on your web property setup. If your site is secured (SSL-compliant ), you must secure all ad content. If UAS receives a request for a secure ad, then UAS delivers only SSL-compliant creatives.


If you are hosting any Rich Media, Video XML URL, or HTML5 creatives that are marked secure, you must ensure that the third party hosting the creatives always returns secure content.


Delivering non-secured ad content on a secured site may cause a warning on the user's browser and the ad or the entire page may be blocked. Use caution when setting the ad tag on a secured page.

UAS ad tags intelligently identify whether pages are secure. UAS ad tags automatically request only secured creatives even if you have configured a non-secure version of an ad tag.

Implement UAS AMP Tags

UAS currently supports a limited number of ad tag types for AMP. The sections before describe supported and unsupported ad types, and other limitations.

You can find AMP page implementation examples on GitHub.


Supported Ad Formats/Creatives

UAS ad tags in AMP currently support the following five ad types:


  • Text
  • Third Party (currently only Wrapper Line Item supports AMP)

    Learn more about OpenWrap AMP Support.
  • Rich Media (if resizable, the creative is cropped according to AMP specifications)
  • HTML5
  • HTTPS/Secure Creative Video

Unsupported Ad Formats/Creatives

The following seven UAS ad tag types are currently not supported in AMP:


  • VAST based (AMP supports HTML5 based Video creatives instead)
  • Native (because UAS must create a div on the page and requires rendering responsibility)
  • Flash
  • Rich Media (that resizes)
  • Interstitial Ads
  • Expandable Ads
  • HTTP/Non-Secure Creative

Supported Parameters

The following table lists the parameters currently supported by the <amp-ad> tag. Submit the parameters as attributes of the tag's json element. See the Examples following the parameters table for specific usage.

ParameterRequiredPurpose
accId
YesYour publisher's account ID.
adUnit
YesThe ID of the ad unit you want to use with AMP.
sizes
YesArray of ad sizes
locLat
NoGeo-location latitude
locLon
No Geo-location longitude
locSrc
NoGeo-location source
pageURL
NoSet custom page URL
targetings
NoKey-value pairs
extraParams
NoKey-value pairs to be passed to PubMatic SSP


Examples

The following short examples demonstrate how to handle various ad formats within an AMP page using the parameters above.

Basic

<amp-ad width="728" height="90"
	type="uas"
	json='{"accountId": "132109", "adUnit": "10002912", "sizes": [[728, 90]]}'>
</amp-ad>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Multi-size Ad

<amp-ad width="728" height="90"
	type="uas"
	json='{"accId": "132109", "adUnit": "10002912", "sizes": [[728, 90], [700, 90], [700, 60]]}'>
</amp-ad>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
The tag's width and height elements should be the greatest pair from the [width, height]s in the sizes attribute of the json element.


Targetings

<amp-ad width="728" height="90"
	type="uas"
	json='{"accId": "132109", "adUnit": "10002912", "sizes": [[728, 90]], 
		"targetings": {"country": ["India", "USA"], "car": "Civic"}}'>
</amp-ad>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Sample Tag

<amp-ad
	width="300" height="250"
	type="uas"
	json='{"accId": "132109", "adUnit": "10002912", "sizes": [[300, 250]],
		"targetings": {"country": ["India", "USA"], "car": "Civic"},
		"locLat": "12.24", "locLon": "24.13", "locSrc": "wifi",
		"pageURL": "http://mydomain.com"}'>
</amp-ad>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
For details on the configuration semantics, please contact the ad network or refer to their documentation.

Limitations

  1. AMP support is possible only for tag-based integration and not for server-to-server integrations.
  2. Single Ad Call for multiple slots on the same web page is currently unsupported in AMP.
  3. Not all the creatives are supported in the AMP-based integration. See Supported Ad Formats/Creatives.
  4. Ad Engine currently doesn't differentiate between supported and unsupported ad formats for AMP. Setup for supported formats is the Publisher's responsibility.
  5. Currently, reporting for distribution between the percentage of the AMP and non-AMP inventory isn't available from the UAS UI. Currently you must create an ARR ticket in order to activate Ad Hoc reporting that can provide this data.

Ad Tag Configuration Guide

Easily configure the UAS Ad Tag/Ad Unit script on your website using UAS JavaScript Tag Examples. These examples demonstrate the following:

  • How to configure UAS Ad Tag/Ad Unit Scripts on web pages.
  • How to set additional parameters such as Location, GDPR, and GDPR Consent for EU users.
  • How to set the custom key value common to all Ad Slots specific to Ad Slot and so on.