Skip to content
Parwaz DigitalMarketing · Web · Courses

Digital Marketing Course · Module 6, lesson 2

Google Tag Manager: tags, triggers, and variables

Learn how Google Tag Manager installs and manages tracking codes, and how to track a WhatsApp click or form submission without editing site code.

What you will learn

  • Explain how tags, triggers, and variables work together
  • Set up a GA4 event for a button click in Google Tag Manager
  • Test tracking with Preview mode before publishing

Google Tag Manager is a free tool for adding and managing tracking codes, called tags, from one place. A developer installs the GTM container code on the site once. After that, a marketer can add the Google tag for GA4, Google Ads conversion tracking, the Meta Pixel, and other tags without editing the website each time. Every change is saved as a version, so mistakes can be rolled back.

GTM works with three building blocks. A tag is the code that sends data, such as a GA4 event. A trigger decides when the tag fires, such as when someone clicks a link starting with wa.me or reaches a thank-you page. A variable holds information the tag or trigger needs, such as the click URL or page path. For example, you might send a GA4 event named whatsapp_click whenever a WhatsApp link is clicked.

Never publish without testing. Preview mode opens your site with Tag Assistant connected, showing which tags fired on each action. Check that the event also arrives in GA4's DebugView. If the site has visitors from regions with consent rules, such as the European Economic Area or the UK, set up a consent banner and Google consent mode so tags respect each visitor's choice. Publish with a clear version name.

Practice task

Create a free GTM account and container for a test site or blog, set up a trigger and GA4 event tag for clicks on a WhatsApp or phone link, and test it in Preview mode.

Digital Marketing Course

Learn this properly,with a final project.

These pages summarise each lesson. The full course teaches them hands-on. Message us for the current fee, schedule, and format.

Available for new projects — Replies within one business day