API ReferenceAnnouncementsCommunity Discussion
API ReferenceCommunity DiscussionAnnouncementsSubscribeLog In
API Reference

Viewability Tags

The viewability_tag (aka JavaScript tag) can be set at the campaign or item level.
For a description of the object schema, see below.

Overview

Using third-party analytics, you can track your Taboola Ad impressions and see how well they meet desired brand safety and viewability outcomes.

To do so, update the viewability_tag property of the campaign or item.

🚧

If the viewability_tag is set at both the campaign and item level, then the item level settings are applied.

Examples

The code samples below illustrate how to set the viewability_tag at the campaign level. Similar operations can be performed at the item level.

Apply 2 viewability tags to a campaign:

POST /backstage/api/1.0/demo-account/campaigns/1234/
{
   "viewability_tag": {
      "values": [
         {
            "tag": "<noscript class=...></noscript><script src=...></script>",
            "type": "MOAT"
         },
         {
            "tag": "<noscript class=...></noscript><script src=...></script>",
            "type": "IAS"
         }
      ]
   }
}
{
   "id": "1234",
   "advertiser_id": "demo-account",
   // ...   
   "viewability_tag": {
      "values": [
         {
            "tag": "<noscript class=...></noscript><script src=...></script>",
            "type": "MOAT"
         },
         {
            "tag": "<noscript class=...></noscript><script src=...></script>",
            "type": "IAS"
         }
      ]
   }
   // ...  
}

🚧

Submit a valid JS Tag, exactly as provided by the vendor. (The example above is for illustration only - it does not include a valid JS Tag.)

🚧

Viewability Tags do not support a PATCH operation - submitted values overwrite old ones.
To remove a tag, submit a new collection (omitting any unwanted tags).

Remove ALL Viewability Tags:

POST /backstage/api/1.0/demo-account/campaigns/1234/
{
   "viewability_tag": {
      "values": []
   }
}
{
   "id": "1234",
   "advertiser_id": "demo-account",
   // ...   
   "viewability_tag": null
   }
   // ...  
}

Dictionary

Get possible values for type property:

POST /backstage/api/1.0/resources/campaigns_properties/viewability-tag-type
{
    "results": [
        {
            "name": "MOAT",
            "value": "Moat"
        },
        {
            "name": "IAS",
            "value": "Ias"
        },
        {
            "name": "GOOGLE_DCM",
            "value": "Google Dcm"
        },
        {
            "name": "DOUBLE_VERIFY",
            "value": "Double Verify"
        },
        {
            "name": "UNKNOWN",
            "value": "Unknown"
        }
    ],
    "metadata": {
        //...
}