Code for Banner Implementation

CCM Advanced
<div id="consent_blackbar"></div> 
<div id="teconsent" style="display: none;"></div> 
<!-- <div id="footerCookie" style="display: none;"></div> --> 
<script src="http://consent.trustarc.com/notice?domain=trustarc.com&c=teconsent &js=bb&noticeType=bb&pcookie&text=true"></script>
📋 NOTE
Contact your Technical Account Manager to get your unique domain name.
Required Code Breakdown

This section outlines the steps in creating custom triggers in the GTM System. Follow the steps accordingly.

1

<div id="teconsent"></div>
<script
src=http://consent.truste.com/notice?domain=trustarc.com&c=teconsent&js=nj&noticeType=bb&pcookie&text=true></script>

This is the CM banner definition to load CM onto the site. It is similar to the regular CM script. Place this code where you would like the CM link/button to appear after the banner disappears (ie. inside your footer).

•  RED contents are required parameters and must be included to invoke the banner
•  PURPLE content indicates that those values must be matching, but you can name it to whatever value
•  BLUE content indicates a unique domain name used to set up your CM. Your Account Manager should have provided you with this value, if not, please contact your Account Manager to get your unique domain name.
2

<div id="consent_blackbar"></div>

The above declaration loads the banner anywhere you declare it on your site. This div element will work as long as the content in #1 (above) exists on the same page as the consent_blackbar element.

Optional Code Breakdown
1

&cookieLink=http://your_URL

This parameter allows clients to change the cookie policy URL. It is useful when a single Consent Manager script is used on multiple websites.

If your URL contains special characters (non-alphabet text), you will need to encode the URL and place the encoded version in the parameter.

PLEASE NOTE: The cookie policy will be in the form of a button in the banner CM.

Please notify your Technical Account Manager and let them know that you require this addition to your banner implementation as it requires modification to your setup.

CCM Professional
<div id="consent-banner"></div>
<div id="teconsent"></div>

<!-- <div id="footerCookie" style="display: none;"></div> --> 

<script type="text/javascript" async="async" src="https://consent.trustarc.com/v2/notice/{cmID}"></script>

You can find this code snippet in Step 4 of the CCM Pro portal at https://ccm.trustarc.com/.

Breakdown of the Consent Manager Pro Script Elements:
Script Description
"consent-banner" Controls the banner placement on your website. This div element should be placed within the page element you'd like the banner to display.
"teconsent" Controls the "Cookie Preferences" link that a user can click to load the Consent Manager at any point they would like to set their preferences.
script tag Controls the calls to Consent Manager and can be loaded anywhere.
{cmId} The unique value of your Consent Manager and should be replaced by the script you produce in Step 5 of the Cookie Consent Creation wizard.
⚠ Important
For security purposes, the Trustarc CCM script is designed to only function on the URLs that you indicated in Step 1 of the Cookie Consent Creation wizard. This helps ensure that your script is not pulled from your site and then used by another third-party website operator.
📋 NOTE
•  If you need to append the script within HTML block elements, you may switch out the <div> element to <span> to ensure the tag is appended correctly to the page. Using <span> instead of <div> is acceptable as well.
•  If you would like to implement the banner on the website in a floating permanent location, please add the CSS styling elements to the consent-banner div element, for example:
<div id="consent-banner" style="position:fixed; bottom:0px; z-index:999999;"></div>
Example HTML Page with Banner Implementation

Here is an example of an HTML page with banner implementation:

CCM Advanced
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 
<head> 
<script src=//consent.trustarc.com/notice?domain=trustarc.com&c=teconsent&js=nj&noticeType=bb&pcookie&text=true></script> 

</head> 
<body> 
<div id="consent_blackbar"></div> 
Test Page Content<br> 
<footer> 
<div id="teconsent" style="display: none;"></div> 
<!-- <div id="footerCookie" style="display: none;"></div> --> 

</footer> 
</body> 
</html> 
CCM Professional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 
<head> 
<script type="text/javascript" async="async" src="https://consent.trustarc.com/v2/notice/{cmID}"></script>

</head> 
<body> 
<div id="consent-banner"></div> 
Test Page Content<br> 
<footer> 
<div id="teconsent"></div> 

</footer> 
</body> 
</html> 
TrustArc  ·  Cookie Consent Manager — UI Customization Guide  ·  www.trustarc.com