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-XXXXXXXand 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:<head> and <body> portions, following Google’s recommended setup.
Verify it’s working
After the agent adds GTM, you can confirm it’s active: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.
What to do next
Once GTM is running, you manage everything from the GTM dashboard:| Task | Where to do it |
|---|---|
| Add Google Analytics | GTM dashboard → Tags |
| Add Meta Pixel | GTM dashboard → Tags |
| Track button clicks | GTM dashboard → Triggers |
| Track form submissions | GTM dashboard → Triggers |
| Add conversion tracking | GTM 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