In this article · 13 sections
- Key terms
- Step 1: Create an account and install
- Step 2: Add your GA4 configuration
- Step 3: Enable click variables
- Step 4: Track phone clicks
- Step 5: Track WhatsApp clicks
- Step 6: Track form submissions
- Step 7: Test with Preview, then publish
- Step 8: Mark them as key events
- Privacy considerations
- Keep your container tidy
- Frequently Asked Questions
- Does GTM slow down my website?
- Can I track clicks on a floating WhatsApp button?
- Do clicks equal leads?
- Is GTM free?
- Want tracking set up correctly?
To know which marketing actually brings customers, you need to track the actions that matter: phone calls, WhatsApp clicks and form submissions. Adding tracking code directly into a website every time is slow and error-prone. Google Tag Manager (GTM) solves this: you install one container code once, then manage all tracking from a web dashboard.
Key terms
| Term | Meaning |
|---|---|
| Container | The GTM code installed on your website |
| Tag | Something that sends data — e.g. a GA4 event or Google Ads conversion |
| Trigger | When the tag should fire — e.g. a click on a tel: link |
| Variable | Information used by tags and triggers — e.g. Click URL |
| Preview mode | Test your setup before publishing |
Step 1: Create an account and install
- Go to tagmanager.google.com, create an account and a "Web" container.
- Copy the two code snippets: one goes high in the
<head>, the other right after the opening<body>tag. - On a PHP website, add them to the shared header file so they appear on every page.
If GA4 is already installed directly in your code, decide on one method — either keep it in code or move it into GTM — so pages aren't counted twice.
Step 2: Add your GA4 configuration
- In GTM, create a new tag of type Google tag.
- Enter your GA4 Measurement ID (starts with G-).
- Trigger: Initialization – All Pages (or All Pages).
Step 3: Enable click variables
Go to Variables → Configure, and enable Click URL, Click Text and Click Classes.
Step 4: Track phone clicks
- Trigger: Click – Just Links, firing on some link clicks where Click URL starts with tel:.
- Tag: Google Analytics: GA4 Event, event name
phone_click.
Step 5: Track WhatsApp clicks
- Trigger: Click – Just Links where Click URL contains wa.me (add another condition or trigger for
api.whatsapp.comif your site uses it). - Tag: GA4 Event, event name
whatsapp_click.
Step 6: Track form submissions
Forms are trickier because many modern forms submit with JavaScript. The most reliable options:
- Thank-you page: redirect to
/thank-youafter success and trigger on that page view. - dataLayer push: ask your developer to add this when the form succeeds:
Then create a Custom Event trigger forwindow.dataLayer = window.dataLayer || []; dataLayer.push({event: 'lead_form_submit', form_name: 'contact'});lead_form_submit. - GTM's built-in "Form Submission" trigger works on some simple forms but often misses AJAX forms.
Avoid tracking the button click as a "lead" — people click submit even when validation fails.
Step 7: Test with Preview, then publish
- Click Preview, enter your website URL, and click your phone, WhatsApp and form buttons.
- Check that each tag shows as "Fired".
- In GA4, open Admin → DebugView to see the events arrive.
- Click Submit in GTM with a clear version name ("Added phone, WhatsApp, form events").
Step 8: Mark them as key events
In GA4, go to Admin → Events (or Key events) and mark phone_click, whatsapp_click and lead_form_submit as key events. Import them into Google Ads if you run ads — see Google Ads conversion tracking.
Privacy considerations
Don't send personal information such as names, phone numbers or emails into GA4 events — Google's policies prohibit it. Mention analytics in your privacy policy. See our DPDP checklist.
Keep your container tidy
Name tags, triggers and variables clearly ("GA4 – phone_click", "Trigger – tel links"). Delete tags you no longer use, and write a short note on each published version. When you change agencies, add them as users with appropriate permissions instead of sharing your Google account.
Frequently Asked Questions
Does GTM slow down my website?
The container itself is light. Too many third-party tags inside it can slow pages, so add only what you need.
Can I track clicks on a floating WhatsApp button?
Yes, the same wa.me click trigger works wherever the link appears.
Do clicks equal leads?
Not exactly. A WhatsApp click shows intent; some people don't send a message. Compare with actual chats received.
Is GTM free?
Yes, the standard version is free.
Want tracking set up correctly?
Joboo Web installs GTM, GA4 and ad conversion tracking. See GA4 for beginners, digital marketing services, or contact us.