Skip to content

BF WP TrustArc

PLEASE NOTE: Trust Arc is a requirement for all Brown-Forman websites. Two Weeks prior to launch - ask BF IT to initiate a scan of your dev or testing URL. BF IT will follow up with details on remediating the site so that it is compliant at launch.

Advice and things worth noting

Test in Incognito/Private Mode.

Interacting with Trust Arc on any Brown-Forman website will cause those same choices to be reflected on all other Brown-Forman domains, Icognito/Private resolves this issue.

Brown-Forman honors the DNT and GCP signals for all users, globally. If you are not seeing the expected dialogs, check whether your browser is sending these signals (sometimes this occurs in Incognito/Private as well).

Website Installation

Pre-Requisites:

-GTM container active -Brown-Forman Age Gate (either bf-wp-js-agegate or bf-wp-forms age gate)

Plugin can be downloaded from this URL and installed manually

https://wp-plugins.b-fonline.com/bf-wp-trustarc/bf-wp-trustarc.latest-stable.zip
Or install via WP-CLI
wp plugin install --force https://wp-plugins.b-fonline.com/bf-wp-trustarc/bf-wp-trustarc.latest-stable.zip

Steps

  1. Install the plugin
  2. Add the following code to the theme, immediately after the opening GTM script, be sure to replace GTM-XXXXXX with the correct container ID. This is part of the Google Consent Mode Configuration:
    1
    2
    3
    4
    5
    6
    7
    8
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
    
        gtag('js', new Date());
        gtag('config', 'GTM-XXXXXX');
        gtag('set', 'ads_data_redaction', true);
    </script>
    

Testing Website Implementation

Debugging Parameters

Use these query parameters to preview the experience for a country or language

1
2
3
4
5
6
7
8
9
?ta_country=<iso2>

//or

?ta_language=<iso2>

//or

?ta_country=<iso2>&ta_language=<iso2>

For example:

https://www.oldforester.com/?ta_country=fr&ta_language=fr

Some older implementations may not have these options active in production.

Trust Arc Dialog Checklist

Test that the expected dialog appears in the following scenarios (use an Incognito browser and make sure your browser settings do not send the Do Not Track DNT signal):

Region Situation Page Expectation
US No Trust Arc Interaction Agegate Black box along bottom
US No Trust Arc Interaction Landing Black box along bottom
US User has interacted with Trust Arc Landing Cookie Preferences in Footer
EU No Trust Arc Interaction Agegate Trust Arc popup in center
EU No Trust Arc Interaction Landing Trust Arc popup in center
EU User has interacted with Trust Arc Landing Cookie Preferences in Footer

GTM Installation

Steps

  1. Import gtm-container-export/trust-arc-gtm-consent-mode.json into the container, follow these instructions: https://support.google.com/tagmanager/answer/6106997?hl=en a. In step 4, follow instructions "To Add file to a new workspace" b. In step 5, choose Merge and troubleshoot if anything is being deleted or modified (sometimes the triggers have already been imported, so it should be fine to overwrite them and then thoroughly test).
  2. Once done importing the JSON, go to Admin -> Container Settings. Check the box for "Enable consent overview," this will help admins verify that new tags have been set up with Consent Mode in mind.

Configuring new Tags

All container tags should be configured with "Additional Consent Checks" a. Require additional consent for tag to fire b. Unless told otherwise, choose ad_storage

Page View tags

If the tag is a "Page View" tag, use a Window Loaded type trigger rather than the more common "Page View" trigger.

Also ad a corresponding "Ad Storage On" trigger (copy and customize to fit tag criteria). This trigger will cause the tag to fire if the user toggles their consent while on the page, otherwise their data will not be caught until next page load.

Nothing beyond Additional Consent Checks -> ad_storage required. Tags will not fire unless user has consented.

GTM Testing

Coming Soon

Troubleshooting

Common Website Issues

  • Ensure that the Javascript in the agegate plugin includes bf-agegate-exclude code. If this code is missing, compare the age gate code with the JS in the repo: https://bitbucket.org/brownforman/bf-wp-js-agegate/src/master/src/js/agegate.js

  • If the EU Consent Box is not showing up as expected, the following should be added to the age gate code along with .bf-agegate-exclude:

    .truste_overlay, .truste_box_overlay
    

  • Sometimes the Cookie Preferences link in the footer is not clickable because it gets covered by the .bf-ta-consent-blackbar div. The following code should be in the Trust Arc CSS to resolve this issue. If the code is already there and the problem persists, contact BF IT:

    1
    2
    3
    .bf-ta-consent-blackbar.consent-asserted {
        pointer-events: none !important;
    }
    

How To...

In wp_register_script or wp_enqueue_script, use #trustecm_functional and #trustecm_functional on the end of a script URL to allow Trust Arc to control them. Example:

wp_register_script('jquery', 'https://code.jquery.com/jquery-3.6.3.min.js#trustecm_functional', '','', true);

The same principle works for standard script tags:

<script type="text/javascript" src="https://example.com/app.js#trustecm_functional"

A lot of script imports qualify as functional, check with BF IT which category a certain script is

Optional filter for youtube.com in ACF values added to bf_trust_arc.php. Filter could also be slightly modified to work on the_content hook to catch youtube embeds.

Check index-gdpr.html in this repo for examples of conditional script loading based on user consent: https://bitbucket.org/brownforman/bf-trust-arc-standalone/src/master/

<button onclick="truste.eu && truste.eu.clickListener()" style="margin-top: 42px;" id="bf_ta_diy_button">Cookie Preferences</button>