Google Tag Manager

Deploy Trodo through Google Tag Manager as a custom HTML tag.

Deploy Trodo through GTM without touching your codebase. It's the same browser SDK as the script snippet, delivered as a Custom HTML tag.

Set up the tag

  1. In GTM, go to Tags → New → Tag Configuration → Custom HTML.
  2. Paste:
<script>
  var script = document.createElement('script');
  script.src = 'https://cdn.trodo.ai/scripts/analytics/trodo.script.min.js';
  script.setAttribute('site-id', 'YOUR_SITE_ID');
  script.setAttribute('auto-events', 'true');
  document.head.appendChild(script);
</script>
  1. Under Triggering, select All Pages.
  2. Save, then Submit to publish.

Custom events through the data layer

Push events from your site to the data layer, then forward them to Trodo with a second Custom HTML tag.

On your site:

dataLayer.push({
  event: 'trodo_track',
  eventName: 'signup_completed',
  eventProperties: { plan: 'pro' },
});

GTM Custom HTML tag, triggered on the trodo_track event:

<script>
  if (window.Trodo) {
    Trodo.track('{{DL - eventName}}', {{DL - eventProperties}});
  }
</script>

Next

On this page