Tagging guide: get started
Overview
This guide is addressed to web developers. It describes the available ad tag types available in Equativ’s Monetization Platform (EMP) as well as the main functions and options to configure the tagging.
Ad tags
Generate ad tags
For instructions on generating ad tags, see the "Ad tags" section in the Create placements article.
Ad tag types
This table describes all the display (web) ad tags available in the Equativ platform.
Ad tag type | Description |
---|---|
NonRich |
|
OneCall |
|
Standalone |
|
Standard |
|
Set up the ad manager – sas.setup(options)
Prior to calling any ad, the sas
object must be initialized, using the sas.setup(options)
method. It must be called only once.
The table below describes the available options.
Option name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
appName |
string | no | empty | Name of your application. |
bundleId |
string | no | empty | Unique identifier; The most recommended pattern is a reverse domain name notation. Make sure bundleId is unique to avoid collisions. |
domain |
string | yes | n/a | Domain of the network (account) at Equativ. |
networkid |
integer | yes | empty | ID of the network (account) at Equativ. |
renderMode |
integer | no; but required for onecall | 0 |
Defines how ads are rendered.
Values:
|
renderModeTimeout |
integer | no; only for sas.renderMode.ON_DEMAND
|
5000 ms | After this timeout in milliseconds, sas.render() will be called. |
uid |
string | no | empty |
Unique identifier which overrides the unique id in Equativ’s pid-Cookie. It is used when devices cannot be identified with cookies (e.g. in mobile apps with Equativ’s iOS or Android SDK); Make sure this id is big enough to avoid id collisions.
Also this parameter will be considered as IFA (the device identifier) if the adcall is considered as in-app – i.e. in cases where there is |
Call ads – sas.call
Once sas.setup
is called, ads can be retrieved by calling the sas.call (callType, ad, [options])
sas.call (callType)
The library supports the following call types:
Call type | Call |
---|---|
iframe | sas.call("iframe", { ... }) |
onecall | sas.call("onecall", { ... }) |
standard | sas.call("std", { ... }) |
xml | sas.call("xml", { ... }) |
sas.call (ad)
This object defines the placement properties.
Parameter | Type | Description |
---|---|---|
formatId |
Integer or String | the format id(s), eg: 1233 or "20142, 20143, 20144"; |
pageId |
Integer | the page id, child element of the site |
pageName |
String |
the page name (optional)
ⓘ Note: if |
schain |
String | the serialized SupplyChainObject
|
siteId |
Integer | the site id, parent element of a page |
tagId |
String | the identifier of the destination container in the DOM |
target |
String |
the
The comma character (,) must never be used as a separator because this character will be considered as part of the key=value or keyword itself. Read more in Set keyword targeting. |
sas.call([options])
This object that defines the call options.
Option | Type | Description |
---|---|---|
beforeRender(data) |
function |
Callback called before the format rendering
The callback is only called when onecall call has returned. If
|
clickTrackingEncodingLevel |
integer |
Sets the encoding level for the
For instance,
Default value: 0 |
clickTrackingUrl |
string |
Adds a 3rd party click tracking URL;
ⓘ Note: There are different kinds of
Default value: empty |
eids |
Array of Object |
Containing the extended ids for a user
|
forceMasterFlag |
boolean |
Forces the master flag, which is used for page view counting. If the master flag is true, the ad call returns an ad (as usual) and the ad call is logged and reported as a page view (page impression).
Default value: false |
getAdContent |
boolean |
Specifies whether a onecall should return the ad content or
⚠️ Warning: works only with the new OneCall tag.
Returning all ad content means that RTB ads will be resolved (if any), no matter if you intend to display a format or not. This may decrease the delivery rate. |
onAd(data) |
function |
Callback called when there is an ad returned in the response of the adserver.
|
onClean(formatId, element) |
function |
Callback called before cleaning the placement
|
onError |
function | Callback called if an error occurred during the call. |
onLoad |
function | Callback called after call has been done, only available in async mode. |
onNoad(data) |
function |
Callback called if there is no ad to display for the given format, if provided for
|
reset |
boolean |
Works with OneCall tag only. Resets all
Default value: false |
resetTimestamp |
boolean |
Resets the timestamp, which is used for features such as links (displaying ads from insertions always together on a page) or exclusions (never display ads from certain insertions together on a page).
Default value: false |