TrueTrackedTrueTracked

Google Tag Manager Installation

If you use Google Tag Manager (GTM), you can install TrueTracked without editing your website's source code. Add the tracking script as a Custom HTML tag, trigger it on every page, and use additional tags for ecommerce events sourced from your existing dataLayer.

Prerequisites: Your TrueTracked workspace ID (under Settings > Pixel Installation) and admin access to your GTM container.

Step 1: Create the base loader tag

  1. In GTM, click Tags > New
  2. Name it TrueTracked - Base Loader
  3. Choose tag type Custom HTML
  4. Paste the base loader script:
<link rel="preconnect" href="https://t.ttrkd.com">
<link rel="preconnect" href="https://t.ttrkd.com" crossorigin>
<script>
(function(w, d, id) {
  var t = w.truetracked = w.truetracked || function() {
    (t.q = t.q || []).push(arguments);
  };
  t._w = id;
  var s = d.createElement('script');
  s.async = true;
  s.src = 'https://t.ttrkd.com/tt.js?w=' + id;
  d.head.appendChild(s);
})(window, document, 'YOUR_WORKSPACE_ID');
</script>
  1. Set the trigger to All Pages (built-in Page View trigger)
  2. Click Save

Step 2: Track ecommerce events from dataLayer

Create additional Custom HTML tags for each event you want to track. Use GTM data-layer variables to pull the values dynamically. Example for a purchase event triggered on the order confirmation page:

<script>
window.truetracked('track', 'purchase', {
  transaction_id: '{{dlv - ecommerce.transaction_id}}',
  value: {{cjs - ecommerce.value (number)}},
  currency: '{{dlv - ecommerce.currency}}',
  email: '{{dlv - user_data.email}}',
  phone: '{{dlv - user_data.phone}}',
  first_name: '{{dlv - user_data.first_name}}',
  last_name: '{{dlv - user_data.last_name}}',
  items: {{cjs - ecommerce.items-TT}}
});
</script>

For the full purchase event field reference (required vs recommended vs optional), see Custom Website.

Step 3: Preview and publish

  1. Click Preview in GTM
  2. Enter your site URL and click Connect
  3. In your browser, perform a test action (e.g. complete a test order)
  4. In the GTM debugger, verify the TrueTracked tag fired
  5. Open browser DevTools → Network tab → filter ttrkd - you should see POST /event requests
  6. Click Submit in GTM to publish the container

Tips for Shopify + GTM

If your Shopify store is wired to GTM via Web Pixels or a data-layer extension (like Elevar), use GTM data-layer variables to pull from ecommerce.products, ecommerce.purchase, etc. The standard Enhanced Ecommerce schema works out of the box.

Custom tracking domain

With a custom tracking domain set up, swap the script src from t.ttrkd.com to your subdomain.

Troubleshooting

  • Tag not firing: In GTM Preview mode, check the "Tags Not Fired" section - usually a trigger mismatch.
  • Data-layer variables resolve to empty: Use GTM's built-in dataLayer panel during preview to confirm the variable path matches your site's actual data layer shape.
  • Container not published: Preview mode reflects your draft; live visitors only see published changes. Click Submit in GTM after testing.