From September, Flash will no longer be supported by Chrome. Prepare for the shift towards HTML5 by visiting our Flash to HTML5 help page

Check it out!

Adopting the Frameworks

What are the parameters?

There are three key parameters to pass to Adform – a flag in case a user is in the GDPR affected area, an IAB Transparency and Consent string and an IAB CCPA Compliance Framework string:

  • gdpr – this parameter informs vendors if a user is in the GDPR affected area. Expected values are either 1 (meaning yes/true) or 0 (meaning no/false).
  • gdpr_consent – this parameter holds all information for vendors to understand if a user has given consent for them to operate.
  • us_privacy  - this parameter indicates that  a sale of data may occur, for example on an impression opportunity. A string can be created to indicate that CCPA applies, or to signal that digital property owner has determined that CCPA does not apply.

In all cases, this information is passed via URL parameters. The method of adding these parameters depends on the tag type.

  • Standard Javascript tags

    For standard Javascript tags, append the gdpr and gdpr_consent parameters as in the example below:

    <script language="javascript" src="https://track.adform.net/adfscript/?bn=[tag_id];gdpr=${gdpr};gdpr_consent=${gdpr_consent_50}"></script>

    ${gdpr} and ${gdpr_consent_50} should be replaced by actual values. In case values are incorrectly passed, Adform will act as if no consent was given.

     

    Example with macro values replaced:

    <script language="javascript" src="https://track.adform.net/adfscript/?bn=1234567;gdpr=1;gdpr_consent=BONyXqWONygp7ABABAENATAAAAAK-AAA"></script>
  • Iframe tags

    For Iframe type tags, append the gdpr and gdpr_consent parameters as in the example below:

    <iframe name="CPbanner[tag_id]" src="https://track.adform.net/adfscript/?bn=[tag_id];cpjs=2;gdpr=${gdpr};gdpr_consent=${gdpr_consent_50};ord=[timestamp]" width="[banner_width]" height="[banner_height]" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>

    ${gdpr} and ${gdpr_consent_50} should be replaced by actual values. In case values are incorrectly passed, Adform will act as if no consent was given.

     

  • Video (VAST) tag URL

    For VAST tag URLs, append the gdpr and gdpr_consent parameters as in the example below:

    https://track.adform.net/serving/videoad/?bn=[tag_id]&v=3&gdpr=${gdpr}&gdpr_consent=${gdpr_consent_50}&ord=[timestamp]

    ${gdpr} and ${gdpr_consent_50} should be replaced by actual values. In case values are incorrectly passed, Adform will act as if no consent was given.

     

  • Adform trackers

    For Adform trackers, append the gdpr and gdpr_consent parameters as in the example below:

    Target URL: https://track.adform.net/C/?bn=[tag_id];gdpr=${gdpr};gdpr_consent=${gdpr_consent_50}
    1x1 pixel counter: <img src="https://track.adform.net/adfserve/?bn=[tag_id];1x1inv=1;srctype=3;gdpr=${gdpr};gdpr_consent=${gdpr_consent_50};ord=[timestamp]" border="0" width="1" height="1"/>

    ${gdpr} and ${gdpr_consent_50} should be replaced by actual values. In case values are incorrectly passed, Adform will act as if no consent was given.

     

  • Other

    If external trackers are used in Adform system, 2 macros are available (we support both TCF macro and corresponding Adform macro) for passing consent to parameters defined by external party:

     Adform Macro TCF Macro Meaning
    __ADFGDPR__
    ${gdpr}
    GDPR applies
    __ADFGDPRCONSENT__
    ${gpdr_consent_XXX}, where XXX is numeric vendor ID

    Transparency and Consent String

    gdpr_pd parameter is not supported by Adform.

    In order for these macros to be filled, gdpr and gdpr_consent parameters must first be passed to Adform tag as in the examples above.

     

  • US Privacy String

    You can use the us_privacy parameter for all tag types. One example on how to append this parameter:

    <script language="javascript" src="https://track.adform.net/adfscript/?bn=[tag_id];us_privacy=${us_privacy}"></script>

     Supported macros:

    Adform Macro TCF Macro  Meaning
    __ADFUSPRIVACY__
     ${us_privacy}  CCPA applies

 

How to retrieve cookie consent data?

The simplest way to retrieve the consent data is to use dedicated CMP functions. Refer to your CMP tool documentation for details. Below is an example of one CMP that outputs consent information into the console as a JSON object.

<script type="text/javascript">
  window.__cmp('getConsentData',null,function(result) { console.log(result) });
</script>

Output:

{gdprApplies: true, hasGlobalScope: false, consentData: "BONKsyAONyggoABABAENAS-AAAAKh_______________9uT4Kp-KDVZwiA"}

As you can see, a CMP provides information about whether GDPR is applicable and a consentData string that should be passed. 
function(result) { console.log(result) } part should be replaced to the callback of your native function that would handle consent information before initiating ad tags.