|Ad Tag 4.2||2018-08-09||AK|
|Ad Tag 4.1||2018-07-24||AK|
|Ad Tag 4.0.4||2018-06-19||AK||Changes and improvements, as well as added GDPR parameters|
|Ad Tag 3.0.4||2018-02-06||AK||Improvements on postscribe to support functional comments on creatives|
|Ad Tag 3.0.3||2018-01-08||AK||Reduced size, various bug fixes|
|Ad Tag 2.3.0 [Deprecated]||2016-11-18||BR||Outstream Video Support added|
|Ad Tag 2.2.19 [Deprecated]||2016-09-13||BR||Secure parameter added|
|Ad Tag 2.2.15 [Deprecated]||2016-04-21||BR||Synchronous Ad Tag parameter added|
|Ad Tag 2.2.7 [Deprecated]||2015-09-15||NC|
Ad Tag speed optimization
Changed VAST Skip timeout
Introduced Windows Phone ID
|Ad Tag 2.2.6 [Deprecated]||2015-08-15||NC||Enhanced passing referrer URL|
|Ad Tag 2.2.5 [Deprecated]||2015-08-07||NC||Bug fixes|
|Ad Tag 2.2.4 [Deprecated]||2015-08-05||NC|
Bundle ID, Website URL, IAB Category, and app name were added as parameters.
|Ad Tag 2.2.0 [Deprecated]||2015-06-16||NC||Added VAST Video 2.0 Support|
|Ad Tag 2.1.5 [Deprecated]||2015-05-07||NC||Added query string param|
|Ad Tag 2.1.4 [Deprecated]||2015-04-20||NC||Removed all document.write|
|Ad Tag 2.1.3 [Deprecated]||2015-03-26||NC||Fix for callback|
|Ad Tag 2.1.2 [Deprecated]||2015-03-17||NC||Introduced wide skyscraper dimension|
|Ad Tag 2.1.1 [Deprecated]||2015-02-23||NC||Added callback for closing interstitial ads|
|Ad Tag 2.1.0 [Deprecated]||2015-02-19||NC||Now supports interstitial|
|Ad Tag 2.0 [Deprecated]||2014-11-17||NC||Rewrite|
|Ad Tag 1.8||2014-07-21||NC||Improved geolocation|
|Ad Tag 1.7||2014-07-11||NC||Introduced geolocation service|
|Ad Tag 1.6||2014-05-06||MO||Added interstitial formats. Instructions for passbacks with Google DFP. Instructions for Mopub. Added Google Advertising ID. Added COPPA. Minor changes.|
|Ad Tag 1.5||2013-11-14||MO||Now supports automatic and manual cachebuster (parameter “cb”)|
|Ad Tag 1.4||2013-10-28||BU||Passback tags are now supported via “passback” parameter. In-App and MobileWeb documents merged.|
|Ad Tag 1.3||2013-10-21||MO||Minor changes. First In-App version.|
|Ad Tag 1.2||2012-12-19||BU||Added additional parameters: autorefresh, format, formatstrict, dimension, dimensionstrict|
|Ad Tag 1.1||2012-02-06||MO||Added additional targeting parameter. Added auto refresh.|
|Ad Tag 1.0||2011-12-06||MO||Initial version|
Ad Tag Generator in SPX
The Smaato Ad Tag can either be assembled and modified according to the documentation below or comfortably generated using SPX's built-in Ad Tag Generator.
To generate your Ad Tags in SPX, please follow these steps:
- First, while in SPX select Integration Options for the dropdown menu in the right corner of the dashboard.
- Then Scroll down to Code Integration for Mobiles Sites.
- In the Ad Tag form, select an Adspace from the drop-down.
- Choose asynchronous or synchronous loading.
- Asynchronous is the default setting and is the ideal selection for most cases;
- We do not recommend selecting synchronous unless you explicitly need to.
- Insert any macros for user information as you have defined them on your page
- (i.e. if you are to enter
%%YOB%%as a macro for User Age, the ad tag will use the value set for
%%YOB%%as an age value in the ad request).
- This step is optional; however, we highly encourage passing user information to increase ad relevance, yield, and revenue.
- (i.e. if you are to enter
- As you're specifying and tweaking the contents of your ad tag, it is simultaneously being generated.
- When you're finished, click Copy to Clipboard, and then paste this into your page, right at where the ad placement should be.
- Now you are done!
|SPX Menu - Integration Options||Ad Tag Section|
Ad Tag Version 4.3
- Ad Tag Code for InApp and MobileWeb
- Outstream Video
- Advanced Usage
- Setting up a Passback for DFP & GPT Tags
- DFP + Autoreload Issue
- Using the Smaato Ad Tag inside MoPub
Please note: a WebView is needed for in-app integrations”, we should add that “richmedia ads will be rendered in iframe for mobile browsers
The main usage of the ad tag is mobile websites, but it can also be used for in-app integrations.
Please note: a WebView is needed for in-app integrations)
The Ad Tag can be easily enriched with user targeting data, device ID, demographics or location data (see table below).
Furthermore, the Ad Tag gives you the option to choose ad dimension, auto reload timer as well as ad display mode (Inline or Fullscreen).
Also, the Ad Tag can be also enriched using your ad server’s replacement macros in order to pass additional targeting data.
Ad Tag Code for InApp and MobileWeb
Full Screen Ads
If you are not able to show inline ads in your mobile website, you should opt for full screen ads; these ads are shown in full screen mode and won't need space inside your site as they will overlay the web page content. Full screen ads can be shown automatically (as soon as they are ready to be shown) or after a user action (e.g. user finished reading an article). Full screen ads can also be dismissed via close button by the user at any time.
In order to enable full screen ads, you need to set first the dimension to full screen (appropriate dimension should be used for tablet and phone) and activate the full screen mode. All you need are the following lines :
For tablet ad dimension, please use "full_768x1024" for portrait mode or "full_1024x768" for landscape mode. Phone dimensions are "full_320x480" for portrait and "full_480x320" for landscape.
Full screen ads can be used in combination with some optional callbacks that will notify you on user actions and ad states.
- shouldShowModal: If this callback is defined, it has to return true or false . If returns true, the modal will be presented, otherwise it will be discarded.
- modalClosedCallback: If defined, this callback will be called once the modal is closed by the user.
If you use the above configuration, the full screen ad will be shown as soon as the is ad is loaded.
The second option is showing the full screen ad after a user action. To enable this, you need to specify that in the ad tag integration and enable caching ads in background, along with modalDisplay parameter, shouldCacheModal parameter should also be set to true.
Outstream video ads can be placed inside any mobile web content.
Publishers can load an outstream video using this ad tag snippet:
We recommend that you generate an Outstream Ad Tag within SPX, as explained hereafter.
Please note the following:
- The value for 'format' key should be 'outstream'
- The value for 'outstreamSelectors' should be the div id where the video should be placed.
- There is no callback needed; the outstream tag will try again after 10 seconds if no ad received. This time is currently not configurable.
Important Note For Outstream Video:
Since a scrolling action is needed in order for the video to auto play, the Outstream Ad Tag should be wrapped by enough scrollable content before and after.
Generating Outstream Video Tags
If you're interested in integrating outstream video ads, we highly recommend using our Ad Tag Generator in SPX - at least for configuring and testing your setup.
Access our Ad Tag Generator here: https://spx.smaato.com/publisherportal/pages/integration/integration.xhtml
Just select an outstream adspace that you've created under Inventory, copy your generated tag and paste it into your page.
To test your setup, use the following test credentials in your tag:
That will look something like this (click to enlarge):
Insert the code at the desired section of your application.
Replace REPLACE_WITH_ADSPACE_ID with your Ad Space ID and replace REPLACE_WITH_PUBLISHER_ID with your Publisher ID.
Please inform your account manager that you’re using the ad tag.
You can add additional targeting data by inserting additional parameter lines. Usually, you’ll insert your ad server’s replacement macros here instead of actual data.
The format to be used is the following:
Parameters & Descriptions
The Div ID where the ad should be placed.
Note: Please use unique Div IDs if there are multiple ad placements on one page.
The desired dimension of ads to be returned.
|gender||no||The user’s gender||male,female,m,f|
Parameter used to enable/disable gdpr
Base64-encoded consent stringonly when gdpr value is set to true
|age||no||The user’s age.2-digit number. If only a range is available, use the mean average.||See example|
|keywords||no||Tags (free text, case insensitive) describing the content.||string: comma separated values|
|qs||no||Query String: A search term entered by the user within the mobile site.||string: comma separated values|
|sync||no||Parameter used for requesting the ad synchronously. (Default:|
|did||yes (for in-app traffic)|
Only for in-app traffic.
Unified Device ID. Should be enriched with the device id (iOS and/or Android).
iOS - Identifier for Advertising (IDFA) please refer to ASIdentifierManager
Android - Google Android Advertising ID please refer to http://bit.ly/MBMTTJ
Android - Android ID please refer to Settings.Secure.ANDROID_ID
Windows Phone - Windows Phone ID please refer to AdvertisingManager.AdvertisingId | advertisingId property
|diddnt||yes (for in-app traffic)|
Only for in-app traffic.
Apple’s advertisingTrackingEnabled Property. (false = user has decided against tracking – this is the opposite way around as on Android)
Android limit ad tracking preference.(true = user has decided against tracking – this is the opposite way around as on iOS)
|coppa||yes||“0” will indicate that your content should not be treated as child-directed for purposes of COPPA. “1” will indicate that your content should be treated as child-directed for purposes of COPPA.||0, 1|
|cb||no||Cachebuster. Insert your cachebuster macro here. This is optional: If no cachebuster is set, we’ll generate our own.||String|
|autoReload||no||Automatically refresh ad. Value in seconds. Minimum value: 10.||Any number, minimum: 10, maximum 240.|
|latitude||no (but highly recommended)||GPS coordinates of the user’s location (latitude).||Latitude as decimal degrees.|
|longitude||no (but highly recommended)||GPS coordinates of the user’s location (longitude).||Longitude as decimal degrees.|
|country||no||The country of the users location.||See example|
|countrycode||no||The country code of the users location.||See example|
|city||no||The city name of the users location.||See example|
|zip||no||The postal code of the users location.||See example|
|region||no||The region of the users location.||See example|
Will enable user geolocation tracking.
PS: This will trigger a popup to get users permission
|true, false (default)|
|ref||yes (‘no’ if the device is requesting directly or if you’re sending the correct referer header of the requesting webpage)||Refers back to the origin of the user (i.e. the URL of your mobile website)||String|
|iabcategory||no (but highly recommended)||The Application or Mobile Website IAB category.||String|
|adspacename||no (but highly recommended)||The Adspace's name. Please use the following format: AppOrSiteName_OSName_AdspaceDimension||String|
Synchronous vs. Asynchronous Ad Tag
Recently, we've added the option to request our ad tag synchronously (as opposed to previously only asynchronously). The following details outline what this means and how this may be useful to you.
What's the difference between the types of Ad Tag?
How may this create issues for me?
As a publisher, asynchronicity of a tag on your own property is a good idea (because your page isn't prone to being stalled by a delayed ad request). However, especially when it comes to cases using an environment that's entirely detached from the rest of the page (such as iframes or SDKs), asynchronous tags have shown to "confuse" said environment and e.g. lead to triggered impression beacons without an ad being actually shown. This mostly applies to using the ad tag within a third-party SDK (e.g. MoPub) or an ad server.
To rectify this, set the
sync parameter's value of your ad tag to
true (the default is
Use callback to trigger custom events in case Smaato serves an ad or does not serve an ad. For example, you can insert a tracking method that informs you whether an ad was served or not. You can also define a custom passback function in order to fill the impression through a different source.
Setting up a Passback for DFP & GPT Tags
If you're using DFP and requesting Smaato via Ad Tag, you can pass an ad request back from a NoAd-response to DFP - just follow these steps:steps:
You'll need to have the following already set up:
- An Adspace in SPX that represents your inventory
- A Line Item in SPX to go along with the above (this can be the default Line Item, or a specific one)
- A Line Item in DFP with the according Ad Tag - use this snippet with your Publisher and Adspace IDs:
If you have all of the above set up, you should be able to send ad requests from DFP to Smaato and receive ads in case of a successful ad call.
Now, for the passback:
2) Set up another Ad Unit in DFP to accommodate for the passback
The Ad Unit needs to be unique to the passback and not used for anything else. Mostly, it makes sense to use the original Ad Unit's name and to add *PB*, (passback) or a similar note to the name.
3) Set up your GPT Tag
This one is a little bit tricky; fortunately, you'll only have to do most of the legwork once.
Head over to https://support.google.com/dfp_sb/answer/1651549#noEdit, and follow the instructions on setting up a GPT tag. Please note that unfortunately, you're not able to use the auto-generated passback tag from within the DFP UI.
This tag contains the routing back to your DFP account, and should look something like this:
DFP + Autoreload Issue
If the ad uses autoreload, there is a bug when DFP detects that the ad with the same uniqueID has been already rendered.
To solve this, it is necessary append an extra command inside the tag snippet provided by DFP
2| googletag = undefined;
4) Set up a House Line Item in SPX
...to send NoAds back in DFP's direction:
- Follow the instructions on https://wiki.smaato.com/display/SPX/Direct+Orders for setting up a House Line Item.
- Set up an HTML creative and paste your GPT tag in there.
- Target this House Line Item to your Adspace (as mentioned above).
- Make sure that the House Line Item is also set to a lower Priority than the Line Item that you'd like to use to get Smaato demand from.
Using the Smaato Ad Tag inside MoPub
- When using MoPub as your primary Ad Server, we recommend you to use Smaato SDK for a seamless integration.
- In order to use our Ad Tag inside Mopub, you need to request it synchronously, i.e. set the
- When using our AdTag inside Mopub in applications running on iOS10, you need to add the "Allow Arbitrary Loads in Web Content" key in the info.plist file in order to allow non-secure creatives to render
You can traffic the Smaato ad tag from within your MoPub instance. Make sure to use the passback functionality (prefilled below) and fill in the MoPub macros. See below: