A tag is a code snippet that publishers place into an ad slot to show an ad on their page. Tags can have different formats, such as HTML or IMG for display ads, and VAST and VPAID for video ads.
Tip
For more information about tag settings, see Create and Customize Tags.
After you've created a direct or a programmatic line item under your campaign and order, and prepared the ad that you want to show, you need to create a tag by assigning the ad to the line item.
With Tags API, you can create, update, and retrieve tags. You can also create a list of all tags and retrieve third-party ad verification details. Tags API categorizes tags based on line item type, separating the workflows for direct and programmatic (also called RTB) tags. Therefore, you can work only with the tag type that is relevant to you — with direct tags for Adform Ad Server, RTB tags for Adform DSP, or both.
To authenticate and use Adform APIs, your user account must have the necessary permissions and your OAuth client must have the required scopes assigned to it.
To create a tag, Adform DSP and Ad Server user account must have these permissions assigned by the business account admin:
-
Manage Campaigns & Orders
-
Manage Direct Line Items, Manage Programmatic Line Items, or both
-
Manage Tags
-
Pause Tags (optional)
Depending on your objectives and workflow, you'll need some or all of the following scopes assigned to your OAuth client by Adform Support (technical@adform.com):
-
https://api.adform.com/scope/tags.direct: Grants access to the DirectTags section of the Tags API. -
https://api.adform.com/scope/tags.rtb: Grants access to RtbTags section of the Tags API. -
https://api.adform.com/scope/tags.readonly: Grants access to the Tags section of the Tags API. -
https://api.adform.com/scope/tags.direct.thirdpartyadverification.readonly: Grants access to the direct tag third-party ad verification endpoint in ThirdPartyAdVerifications section of the Tags API. -
https://api.adform.com/scope/tags.rtb.thirdpartyadverification.readonly: Grants access to the RTB tag third-party ad verification endpoint in ThirdPartyAdVerifications section of the Tags API.
Tip
If you don't have an OAuth client yet, follow the procedure in Get Authentication Credentials for Adform APIs to register one.
To set up a tag with API, you must use the following IDs in your requests:
|
ID |
Used For |
Retrieve From |
|---|---|---|
|
|
Specify the campaign to which the tag belongs |
|
|
|
Specify the direct line item ID (for direct tags) or placement ID (for RTB tags) for which to assign the ad |
|
|
|
Specify the ad to assign to a line item |
Note
Additional IDs might be used, but the listed ones are required to pass a request.
After you've created a direct or a programmatic (RTB) line item and prepared an ad, you can continue with creating a tag.
To create a tag using Tags API, you need to complete these steps:
-
Retrieve the direct tag's script to send to the publisher.
The DirectTags section of Tags API provides the endpoints to work specifically with direct tags — create new tags, update all or selected tag settings, retrieve tag information or tag script by tag ID.
To create a new direct tag, use the POST endpoint in the DirectTags section of the Tags API.
See the parameter list for more information about the required and optional parameters.
Tip
To learn how to use Adform APIs, read Guide to Using Adform APIs.
Tags API provides separate endpoints to:
-
Update all tag details
-
Add or update external scripts
-
Update destination URLs
-
Update general settings
-
Add or update tracking pixels
-
Replace the tag's ad
-
Replace the line item that the tag belongs to
-
Pause direct tags by updating the paused status (works only if the user account has the Pause Tag permission)
Note
Pausing a direct tag won’t stop its delivery. If you pause a direct tag, your display ad will be empty. Clicks on the empty ad will still lead to the landing page and collect tracking data.
-
Change the tag's active status to archive or restore the tag
Note
Changing a direct tag’s active status won’t stop its delivery. To stop ad delivery for archived direct tags, contact the publisher and request the removal of your tags.
-
Update the tag's sent status
To update all tag details, use the PUT endpoint in the DirectTags section of the Tags API.
Note
Replace the {id} part in the endpoint with the ID of the tag that you want to update.
See the parameter list for more information about the required and optional parameters.
Adform generates and loads specific serving scripts for each unique environment where the direct tag is served. A serving script initiates the connection with the ad server, loads the ad, correctly positions it within the page, and collects the engagement metrics like viewability, mouse overs, and heat map parameters.
Note
Before deploying tracking tags, clients should ensure that users have been provided with appropriate privacy information and that any required consent or other applicable privacy signals have been obtained. Tags should be configured in accordance with applicable privacy laws and data minimization principles.
To retrieve a tag's script by tag ID, use the GET endpoint in the DirectTags section of the Tags API.
Note
Replace the {id} part in the endpoint with the ID of the tag whose script you want to retrieve.
In the ThirdPartyAdVerifications section of Tags API, you can retrieve the tag-wrapping status of your direct tags.
Note
This feature is currently available only for Integral Ad Science (IAS) clients that have linked their Adform and IAS campaigns.
To retrieve tag-wrapping information by tag ID, use the GET endpoint in the ThirdPartyAdVerifications section of the Tags API.
Note
Replace the {id} part in the endpoint with the ID of the tag that you want to retrieve measurement information for.
Replace {partner} part in the endpoint with ias, the name of the Adform partner providing tag-wrapping for your tags.
The RtbTags section of Tags API provides the endpoints to work specifically with RTB tags — create new tags, update all or selected tag settings, retrieve tag information by tag ID.
To create a new RTB tag, use the POST endpoint in the RtbTags section of the Tags API.
See the parameter list for more information about the required and optional parameters.
Tip
To learn how to use Adform APIs, read Guide to Using Adform APIs.
Tags API provides separate endpoints to:
-
Update all tag details
-
Add or update tracking pixels
-
Update destination URLs
-
Update general settings
-
Add or update external scripts
-
Replace the tag's ad
-
Change the tag's active status to archive or restore the tag
Note
Changing an RTB tag’s active status to
falsewill archive the tag and stop its delivery.
To update all tag details, use the PUT endpoint in the RtbTags section of the Tags API.
Note
Replace the {id} part in the endpoint with the ID of the tag that you want to update.
See the parameter list for more information about the required and optional parameters.
In the ThirdPartyAdVerifications section of Tags API, you can retrieve the tag-wrapping status of your RTB tags.
Note
This feature is currently available only for Integral Ad Science (IAS) clients that have linked their Adform and IAS campaigns.
To retrieve tag-wrapping information by tag ID, use the GET endpoint in the ThirdPartyAdVerifications section of the Tags API.
Note
Replace the {id} part in the endpoint with the ID of the tag that you want to retrieve measurement information for.
Replace {partner} part in the endpoint with ias, the name of the Adform partner providing tag-wrapping for your tags.
You can retrieve a comprehensive list of all existing tags within your campaign (direct and RTB tags included) and filter the results by line item IDs, ad UUIDs, tag IDs, tag UUIDs, tag name, tag type, or active status.
To retrieve a list of all existing tags, use the POST endpoint in Tags section of the Tags API.
See the parameter list for more information about the required and optional parameters.
These are the parameters that you must define when creating or updating tags:
Tag Creation
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Campaign ID specifies the campaign for which to create the tag |
Both |
|
Integer |
|
|
Required |
Ad UUID specifies the ad to assign to the tag |
Both |
|
String |
|
|
Optional |
Tag name can contain a maximum of 256 characters, including spaces |
Both |
|
String |
|
|
Required |
Base line item ID specifies the line item ID (for direct tags) or the placement ID (for RTB tags) |
Both |
|
Integer |
Tag List Creation
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Filter tags by |
Both |
|
Integer |
|
|
Optional |
Filter tags by |
Both |
|
Array |
|
|
Optional |
Filter tags by |
Both |
|
String |
|
|
Optional |
Filter tags by |
Both |
|
Boolean |
|
|
Optional |
Filter tags by |
Both |
|
Array |
|
|
Optional |
Filter tags by |
Both |
|
Array |
|
|
Optional |
Filter tags by tag |
Both |
|
String |
|
|
Optional |
Filter tags by tag |
Both |
|
Enum |
General Settings Update
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Format specifies the tag format to use when delivering ads. Tag format depends on the type of ad assigned to the tag and the requirements of the selected publisher. |
Direct |
|
Enum |
|
|
Required |
Serving method specifies the ad serving method to use when delivering ads. Ad serving method depends on the type of ad assigned to the tag and on who hosts the ad (Adform or the selected publisher). |
Direct |
|
Enum |
|
|
Required |
Ad notice defines whether to display the AdChoices icon on ads served by Adform |
Both |
|
Boolean |
|
|
Required |
Tag name can contain a maximum of 256 characters, including spaces |
Both |
|
String |
Destination URLs Update
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Tag member parameter lists the tag members to which the destination URL applies If the tag has no members, set the |
Both |
"tagMember": {
"rotatorMemberId": "c47bd8c1-ef0c-47fb-bc47-2582e8860f64",
"scheduleMemberId": "53817a1c-7b1a-4a06-8c5d-84797e548107",
"innerBannerId": "fb199995-5b98-4517-90d9-b2ef2900433a"
},
|
Object |
|
|
Optional |
Rotator member ID specifies the tag member with a rotator ad type |
Both |
|
String |
|
|
Optional |
Schedule member ID specifies the tag member with a schedule and nested rotator ad type |
Both |
|
String |
|
|
Optional |
Inner banner ID specifies the tag member with a synchronized ad type |
Both |
|
String |
|
|
Required |
Value specifies the destination URL that the tag’s ad leads to Depending on the selected |
Both |
|
String |
|
|
Required |
Type defines the change that you want to make to the destination URL Set value to |
Both |
|
Enum |
Tracking Pixels Update
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Tag member parameter lists the tag members to which the tracking pixels apply If the tag has no members, set the |
Both |
"tagMember": {
"rotatorMemberId": "c47bd8c1-ef0c-47fb-bc47-2582e8860f64",
"scheduleMemberId": "53817a1c-7b1a-4a06-8c5d-84797e548107",
"innerBannerId": "fb199995-5b98-4517-90d9-b2ef2900433a"
},
|
Object |
|
|
Optional |
Rotator member ID specifies the tag member with a rotator ad type |
Both |
|
String |
|
|
Optional |
Schedule member ID specifies the tag member with a schedule and nested rotator ad type |
Both |
|
String |
|
|
Optional |
Inner banner ID specifies the tag member with a synchronized ad type |
Both |
|
Stirng |
|
|
Optional |
Impression pixels parameter lists the URLs that are used to track ad impressions Impression pixel URL must:
|
Both |
|
Array |
|
|
Optional |
Click pixels parameter lists the URLs that are used to track clicks on the ad Click pixel URL must:
|
Both |
|
Array |
|
|
Optional |
Event pixels parameter lists the URLs that are used to track video ad events If the tag has no video ad event pixels, leave the |
Both |
"eventPixels": [
{
"value": "https://www.adform.com",
"eventId": 25
}
]
|
Array |
|
|
Required |
Value specifies the URL that is used to track a video ad event Video ad event pixel URL must:
|
Both |
|
String |
|
|
Required |
Event ID specifies the video completion point that fires the event tracking pixel Adform supports these video completion points:
|
Both |
|
Integer |
External Scripts Update
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Source specifies the third-party script URL that is used to extend your ad functionality with features of other systems Third-party script URL must:
|
Both |
|
String |
|
|
Required |
Script position specifies the loading order of the script Set value to |
Both |
|
Enum |
|
|
Required |
Type specifies the type of the third-party script Set value to |
Both |
|
Enum |
Universal Ad IDs Update
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Ad ID Registry ID identifies the ad registry that assigned a unique ID to a video ad in the tag. Ad registration ensures that a video ad can be recognized across different platforms. Adform supports these ad registries:
|
RTB |
|
Integer |
|
|
Required |
Value specifies the unique ID assigned to the video ad by the ad registry |
RTB |
|
String |
Line Item Update
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Base line item ID specifies the line item ID |
Direct |
|
Integer |
Ad Update
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Ad UUID specifies the ad to assign to the tag |
Both |
|
String |
|
|
Optional |
Update name flag indicates whether to synchronize the tag name with the name of the new ad |
Both |
|
Boolean |
Status Updates
|
Parameter Name |
Required or Optional |
Description |
Direct or RTB |
Enum or Example Values |
Type |
|---|---|---|---|---|---|
|
|
Required |
Active parameter defines whether the tag is active or archived NoteChanging a direct tag's active status won't impact its delivery. Changing an RTB tag's active status will stop or resume its delivery. |
Both |
|
Boolean |
|
|
Required |
Paused parameter defines whether the direct tag is active or paused NotePausing a direct tag won’t stop its delivery. If you pause a direct tag, your display ad will be empty. Clicks on the empty ad will still lead to the landing page, but won't collect tracking data. |
Direct |
|
Boolean |
|
|
Required |
Sent at parameter defines the date and time when the tag was sent (in ISO 8601 format) |
Direct |
|
String |