CDPGuidesSupport
SDKsClient

Google Tag Manager (client)

The Ours Privacy GTM template offers a way for you to install and track without the need to install the Web SDK.

Note: We strongly recommend using the Ours Privacy Tag Manager. It is purpose-built for HIPAA-regulated analytics and offers tighter integration with Ours Privacy. To set it up, see Tag Manager installation.

This page details installation via Google Tag Manager (GTM) for users who have an existing GTM setup. For other installation methods, see our main Installation Guide.


Quick Setup

  1. Download the GTM Template
    Ours Privacy GTM Template Upload the template in GTM under Templates → Tag Templates → New

  2. Create an "Install" Tag
    Create a new Tag in GTM with the following specifications:

    • Tag Type: Ours Privacy (from template)
    • Action: Install
    • Token: paste the Project Token from Ours Privacy
    • Trigger: Initialization - All Pages
  3. Create Tracking or Identify Tags

    • Action: Track or Identify
    • Event Name: your custom name (e.g. Appointment Booked)
    • Trigger: based on user interaction (e.g. Form Submission)
  4. Allowlist Events in Ours Privacy
    After you preview your site and verify tag firing, log into the Ours Privacy dashboard Go to Recent Events → Destinations → Allowed Events List Add the exact event names that you configured in GTM.


How It Works

  • GTM loads the Ours Privacy template
  • Each event fires securely to Ours Privacy servers
  • Ours Privacy captures UTM/referrer/Click ID (e.g. gclid) automatically with each event
  • Events are forwarded to your configured destinations

Advanced Configuration

Proxying for Enhanced Privacy

For enhanced privacy, consider using the Ours Privacy Tag Manager which proxies all tracking through Ours Privacy infrastructure by default—no additional configuration needed. See Custom Domains for more details on proxying.


Using a Custom Domain

If you serve the SDK from a custom domain, the GTM setup needs two changes, not one:

  1. In the Install tag's advanced options, set the Custom Domain field to your domain (for example, https://metrics.yourdomain.com).
  2. In the Ours Privacy tag template itself, open the Permissions tab and add your custom domain to the Injects Scripts allow-list (for example, https://metrics.yourdomain.com/*).

The second step is easy to miss: if your custom domain isn't on the Injects Scripts list, GTM blocks the script and the Install tag stops firing.


Overriding Default Properties

If you store data like gclid, UTM parameters, or user IDs in GTM variables, you can override what Ours Privacy auto-detects by passing them as overrides.

This ensures the values you provide take priority.


Identifying Users Without Events

You can use the Identify action alone to attach properties (like user ID or plan) without tracking an event.


Manual Event Tracking

You can still use the SDK function in parallel with GTM:

ours('track', 'Custom Event Name');

Final Steps

  • Use GTM Preview Mode to verify your tags
  • Check the Recent Events tab in the Ours Privacy dashboard
  • Add required event names to Allowed Events
  • Publish your GTM container

Need Help?

Contact support@oursprivacy.com for assistance, or consider migrating to the Ours Privacy Tag Manager for a more integrated experience.

How is this guide?

On this page