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 Framework

What are the parameters?

There are two key parameters to pass to Adform – a flag in case a user is in the GDPR affected area and an IAB consent framework compliant consent 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 provides consent cookie value itself that holds all information for all purposes and vendors to understand if a user has given consent for them to operate.

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}}"></script>

    {{GDPR}} and {{GDPR_CONSENT}} 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}};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}} 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}}&ord=[timestamp]

    {{GDPR}} and {{GDPR_CONSENT}} 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}}
    1x1 pixel counter: <img src="https://track.adform.net/adfserve/?bn=[tag_id];1x1inv=1;srctype=3;gdpr={{GDPR}};gdpr_consent={{GDPR_CONSENT}};ord=[timestamp]" border="0" width="1" height="1"/>

    {{GDPR}} and {{GDPR_CONSENT}} 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 for passing consent to parameters defined by external party:

    Macro Meaning
    __ADFGDPR__ GDPR applies
    __ADFGDPRCONSENT__ Consent daisy bit information

    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.

     

 

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.