landscape
Display Ad Server
Serve ads in standard fixed-size ad units
api
Native Ad Server
Serve native ads on your web page or app
ondemand_video
Video Ad Server
Serve MP4 video ads as pre/mid/post-rolls
laptop_chromebook
For Publishers
Maximize revenue for direct deals.
campaign
For Advertisers
Optimize campaigns, real-time insights.

Ad Tags

Home chevron_right User Guide

Table of Contents

1. Generating the ad tag
2. Live Preview
3. Iframe Tags
4. Modifying Ad Tags

Generating the ad tag

Open a auto_storiesZone, then click the blue Ad Tag button at the top right.
Zones Tag AdGlare AdServer
From there, you can see and copy the tag.
Zones Copy Tag AdGlare AdServer
  • Display Ads — By default, AdGlare uses asynchronous ad tags that don't block rendering of the main page.
  • Native Ads — The ad tag in this case is a URL, that returns one or more ads as a JSON response. You or your developers can then parse the JSON code and use the data to expand placeholders in your own HTML ad template.
  • VAST Video Ads — The ad tag in this case is a URL, that returns a VAST XML response containing the ad. This URL should be added to a VAST-compliant video player in order to pre/mid/post-roll the ad.
  • Redirect Ads — The ad tag in this case is a URL, that returns a HTTP 302 to the landing page of the creative.

Live Preview

The Live Preview Page in the ad server provides a dynamic way to visualize how ads will appear within a specific zone before they go live. This feature is crucial for ensuring that auto_storiesCreatives are displayed correctly and meet the intended design specifications.
Zones Preview Button AdGlare AdServer
When using the Live Preview Page, your own user data such as device type and country may be utilized to accurately simulate how ads will appear and perform. This data helps in providing a realistic preview of ad delivery based on the specific characteristics of the user's environment. In other words, if you've targeted the campaign to users from Brasil and you're in the USA, the ads may not show up.
Zones Preview AdGlare AdServer

Iframe Tags

Many publishers prefer iframe tags over JavaScript-based tags because iframes ensure a consistent ad display across different browsers and devices. Since iframes encapsulate the ad content, they are less likely to be influenced by variations in the publisher's page code or CSS styles. This encapsulation helps maintain a predictable appearance for ads, regardless of the surrounding content.

To generate iframe tags, make sure your Zone is of the type 'Display Ad'. When generating the tag, activate the Iframe Version toggle.

Zones Iframe Tag AdGlare AdServer

Modifying Ad Tags

Display Ad tags can be modified using the JavaScript API that AdGlare provides. Let's take this ad tag as an example: <script async src="https://try.engine.adglare.net/?js"></script>
<span id=zone123456789>
    <script>
        window.AdGlare = window.AdGlare || {q:[],run:function(){}};
        window.AdGlare.q.push(function() {
            AdGlare.setZone(123456789).load();
        });
        window.AdGlare.run();
    </script>
</span>

The only line that is eligible for modification is:

AdGlare.setZone(710732824).load();

The rest of the code should be left untouched.

Ad Sizes

To define which auto_storiesAd Sizes are supported in the zone, use the adSizes() function: AdGlare.setZone(710732824).adSizes(['300x250','468x60']).load();

Keywords

To set keywords used for Keyword Targeting, use the keyWords() function: AdGlare.setZone(710732824).keyWords(['cars','audi']).load();

Key/values

To set key/values used for keyValue Targeting, use the keyValues() function: AdGlare.setZone(710732824).keyValues({'color':'red'}).load();

Custom Macros

To create custom auto_storiesMacros that are available at runtime, use the customMacros() function: AdGlare.setZone(710732824).customMacros({'{model}':'ID4','{make}':'Volkswagen'}).load();

Click Tracking URL

If you're a publisher, and your advertiser provided you with a click tracking URL in order to log click on their end, you can add this as follows: AdGlare.setZone(710732824).clickTrackingURL('https://track.com/?19dj2n4').load();

Page URL

If you're an advertiser and your ad tag is loaded inside a publisher's iframe, you can add the URL on which your ad is shown as follows: AdGlare.setZone(710732824).pageURL('https://publisher.com/some-article').load();
AdGlare will try to determine the domain on which the ad is shown. However, due to cross-domain iframe restrictions, you may end up seeing the domain from the publisher's ad server instead. To avoid this, adding the page URL to the ad tag is preferred.

Typically, the publisher has a macro available that expands to the page URL. Before sending the ad tag to the publisher, you can write a placeholder so that the publisher can replace it with their macro accordingly: AdGlare.setZone(710732824).pageURL('PAGE_URL_MACRO_HERE').load();
Note: the publisher should not remove the single quotes flagging the PAGE_URL_MACRO_HERE placeholder.


Reach out to emailAdGlare Support in case you need further help. You can expect a reply in less than 24 hours.

More guides

The Basics
Getting Started
Understanding the UI

Serving Ads
Campaigns
Creatives
Zones
Ad Tags

Reports
Creating Reports
Custom Dimensions
Data Shipping
Viewability

Settings
Ad Sizes
Bot Filter
White Label

Advanced
Macros
Tracking Pixels
Custom Metrics
Creative Optimization
Lazy Loading
Frequency Capping

Management
Team Members

Others
Troubleshooting
Best Practices
Terms & Definitions
AdGlare Subscription