Integrate Hubspot

How to setup Hubspot with TRUENDO in Google Tag Manager

Some services might need some extra attention to be set up properly. Hubspot is one of these cases. In order to use Hubspot properly we have to let it set its cookie but only allow tracking if the User consents to it. There are only a few steps to follow.

  1. Go to the TRUENDO tag in the Tag Manager.
  2. Replace all the code with the following:
function TruendoCookieControlCallback(cookieObj) {
  if (cookieObj.preferences) {
  if ( {
  if (cookieObj.statistics) {
    _hsq.push(['doNotTrack', {track: true}]); // Enable Hubspot tracking
  } else {
    _hsq.push(['doNotTrack']); // Disable Hubspot tracking
  if (cookieObj.social_content){
  if (cookieObj.social_sharing) {
<script async="" id="truendoPrivacyPanel" type="text/javascript" src="" data-siteid="YOUR WEBSITE ID">
Important Note: Make Sure that your replace the data-siteid with the one of your domain. You can find your Site ID in your Console. Under Integration on the Integrate to Website tab.
  1. Remove the async attribute from your Hubspot script.

  2. Add a standard trigger to your Hubspot tag. For example the All Pages trigger.