Website script

digitalAudience offers a website script designed to help publishers, on the one hand, make their traffic interoperable and, on the other hand, create segments and increase segment volumes in the data marketplaces.

Below are the instructions on how and where to place the script on all website pages.

The contents of the script may vary, depending on the publisher's use case, for example, whether a data management platform is involved, the certain parts of the traffic needs categorization or authenticated traffic is available.

The script will read the TCF-compliant consent management platform (CMP) objects internally and will only operate according to the consent settings of the user.

Add the following script to the end of the <body>, close to the closing of the body tag </body>;

<script language="javascript">
(function() {
  function loadDA() {
    try {
      var __s = document.createElement("script");
      __s.src = "https://target.digitalaudience.io/bakery/scripts/da.js";
      __s.addEventListener ("load", 
      function(){ 
        __da.bake({
        partner:'PARTNER', 
        parcid:'PARTNERID', 
        publisher:'PUBLISHERID', 
        category:'category1' OR [category1,category2,category3], 
        email:'HASHED_EMAILADDRESS_HERE',
        syncs:[vendorid1,vendorid2] OR [],
        consent:[vendorid1,vendorid2],
        dpixel:'DPIXELID',
				did:'DEVICE_ID_HERE',
				dtype:'DEVICE_TYPE_HERE(IDFA or AAID)'
      }); 
      __s.remove();
      }, false);
      document.body.appendChild(__s);
    } catch (err) {
      console.error("Error loading da.js:", err);
    }
  }
  
  if (document.body) {
    loadDA();
  } else {
    document.addEventListener("DOMContentLoaded", loadDA);
  }
})();
</script>
circle-info

If your app has a web content wrapper, you can use the script above and populate the marketing advertiser id and device type properties next to the others.

Parameter
Description

partner

Data Management Platform (DMP) identifier provided by digitalAudience when applicable

parcid

User identifier provided by the DMP

publisher

Publisher's identifier provided by digitalAudience

category

If categorization is applied to the site structure and the category is available in the data layer, a single selected category (id) or an array [a,b,c] can be passed along

email

Hashed email address when available, for instance on a login page

syncs

List of IAB vendor ids to allow syncing process [refarrow-up-right]. Pass an empty array if no vendor should be allowed or leave out the parameter for the standard list of vendors.

consent

IAB vendor id to allow syncing process for the CDP/DMP [refarrow-up-right]

dpixel

Pixel id to generate dashboard data for this website

did

Marketing Advertising ID

dtype

Device type (IDFA or AAID)

Privacy Clause

In case the publisher hasn't implemented a CMP yet, digitalAudience requires publishers to include its privacy clause into their cookie banners. The clause is available in English and Dutch. Please see details below.

English

We use digitalAudience techniques to collect statistics and insights about the use of our website and services. More information about digitalAudience and the techniques used can be found herearrow-up-right.

Dutch

Wij maken gebruik van technieken van digitalAudience om statistieken en inzichten te verzamelen over het gebruik van onze website en dienstverlening. Meer informatie over digitalAudience en de gebruikte technieken kunt u hier vindenarrow-up-right.

Last updated