Skip to main content
Google Tag Manager (GTM) lets you manage tracking tags (analytics, ads, remarketing) from one dashboard, without editing code every time you add a new tool. Instead of asking the agent to add each tracking script separately, you add GTM once and manage everything else from the GTM interface.

Why use Google Tag Manager

  • One setup, any tool. Add GTM once and connect Google Analytics, Meta Pixel, LinkedIn Insight Tag, and more, all without touching your project again.
  • Full control from the GTM dashboard. Add, update, or remove tags anytime without having to prompt the agent each time.
  • Understand exactly how visitors use your site. Track clicks, form submissions, page views, and custom events with GTM triggers.
  • Test before anything goes live. GTM’s preview mode lets you confirm tags are firing correctly before you publish.

What you need

Before you start, make sure you have:
  • A Google Tag Manager account. Create one for free at tagmanager.google.com
  • Your GTM Container ID. It looks like GTM-XXXXXXX and you’ll find it at the top of your GTM workspace

Add GTM to your project

Open the chat in your Macaly project and ask the agent:
Add Google Tag Manager to my site. My container ID is GTM-XXXXXXX.
The agent adds the GTM script to your project in the right place, both the <head> and <body> portions, following Google’s recommended setup.
Replace GTM-XXXXXXX with your actual container ID from your GTM dashboard.

Verify it’s working

After the agent adds GTM, you can confirm it’s active:
1

Open GTM Preview mode

In your GTM dashboard, click Preview. Enter your Macaly project’s URL.
2

Check the Tag Assistant

Google Tag Assistant opens in a new tab and connects to your site. You should see your container listed as connected.
3

Check for fired tags

Browse your site and watch the Tag Assistant panel. Any tags you’ve configured in GTM should appear as fired.

What to do next

Once GTM is running, you manage everything from the GTM dashboard:
TaskWhere to do it
Add Google AnalyticsGTM dashboard → Tags
Add Meta PixelGTM dashboard → Tags
Track button clicksGTM dashboard → Triggers
Track form submissionsGTM dashboard → Triggers
Add conversion trackingGTM dashboard → Tags
GTM vs adding scripts directly. If you only need Google Analytics and nothing else, you can skip GTM and add GA4 directly. GTM is worth it when you plan to use multiple tracking tools or want to manage tags without returning to the chat.
Cookie consent. GTM tags often set cookies that track visitor behavior. If your site has visitors from the EU, UK, or other regions with privacy laws, you are responsible for ensuring a cookie consent solution is in place before GTM tags fire.

Good to know

  • GTM doesn’t slow down your site when set up correctly. The agent follows Google’s async loading recommendation
  • You can use GTM’s built-in variables to track page paths, click URLs, form IDs, and more without any extra code
  • If you need the agent to fire a custom event (like a successful booking or purchase), just ask. The agent can push events to GTM’s data layer