Tools & TrackingExtra· 35 min read

Google Tag Manager (GTM)

Google Tag Manager lets you add and change tracking on your website by clicking, not coding — so you can measure new things without waiting for a developer.

What you will learn

  • Explain what GTM is and why analysts use it
  • Name the three building blocks: tags, triggers and variables
  • Set up a button-click event in plain steps

The problem GTM solves

So far we have talked about reading analytics. But how does the data get into GA4 in the first place? Someone has to place little pieces of tracking code on the website. In the old way, every time marketing wanted to track a new thing — a button click, a form submit, a video play — they had to ask a developer to edit the website code, wait days, and hope nothing broke.

Google Tag Manager (GTM) is a free Google tool that fixes this. A developer adds GTM to the site once. After that, you (the marketer) log into GTM and add or change tracking yourself by filling in forms and clicking buttons — no coding, no waiting. GTM is sometimes called a tag management system.

Think of GTM as a remote control for all the little tracking snippets on your site. Instead of opening up the website each time, you press buttons on the remote and the tracking updates.

The three building blocks

Everything in GTM is made of just three things. Once these click, GTM stops feeling scary:

BlockPlain meaningEveryday example
TagThe thing you want to do (send data somewhere)Send a "purchase" event to GA4
TriggerWHEN the tag should fireWhen someone clicks the Buy button
VariableA piece of extra informationThe price of the product, ₹800

Read it as one sentence: "Fire this tag when this trigger happens, and include these variables." For example: fire the GA4 purchase tag when the order-confirmation page loads, and include the order value.

What is the dataLayer?

There is one more word you will meet: the dataLayer. It is simply a small list of information that the website hands to GTM — like a note passed under the table saying "the order value was ₹800, the product was a kurta". GTM reads the dataLayer, picks out the values it needs (as variables), and sends them on to GA4.

You do not have to build the dataLayer by hand as a beginner; most shop platforms (Shopify, WooCommerce) fill it in for you. Just know that when someone says "grab it from the dataLayer", they mean "read that note the website left for us".

A worked example: tracking a "Call Now" button

The bakery wants to know how many people click the Call Now button on its website, because each click is basically a phone order. With GTM, here is the whole job, start to finish:

  1. In GTM, create a trigger of type Click, set to fire only when the clicked element is the Call Now button.
  2. Create a tag of type GA4 Event, and name the event call_now_click.
  3. Attach the trigger to the tag, so the tag fires only on that click.
  4. Press Preview to test it in your own browser, click the button, and check the event appears.
  5. Press Submit / Publish to make it live for all visitors.

After publishing, GA4 starts receiving a call_now_click event every time anyone taps the button. You can then mark it as a key event (a conversion), exactly as you learned in the conversions lesson. Here is what the finished setup looks like written out:

A complete GTM setup for tracking the Call Now button
Tag:      GA4 Event  ->  event name: call_now_click
Trigger:  Click  ->  only when element = "Call Now" button
Variable: (none needed for a simple click)

After Publish:
  GA4 receives "call_now_click" every time the button is tapped
  Mark it as a key event  ->  it becomes a conversion

Note: Notice there is no website code in this setup — only choices you click inside GTM. The developer set up GTM once; everything after that is yours to control. That independence is exactly why employers expect analysts to know GTM.

Why GTM matters for your career

Almost every "marketing analyst" or "digital marketer" job listing assumes you can set up tracking in GTM. It is the difference between "I can read reports" and "I can decide what gets measured and make it happen". The reading-reports skill is common; the GTM skill is what gets you hired.

Tip: Always use Preview mode before publishing. It opens your site in a special debug window and shows, tag by tag, what fired and what did not — so you catch mistakes before real visitors are affected.

Watch out: A broken or duplicated GTM tag can double-count your conversions or send no data at all. Change one thing, preview it, confirm it fires once, then publish. Never publish untested tags on a live site.

Q. In Google Tag Manager, what does a trigger decide?

Answer: A trigger sets the condition for WHEN a tag fires (such as a click or a page load). The tag itself decides WHAT to do, and variables hold extra information like price.

✍️ Practice

  1. Write out the tag, trigger and (if any) variable you would set up in GTM to track clicks on a "Download Brochure" button.
  2. In one sentence, explain to a shopkeeper why GTM means they no longer have to call a developer for every tracking change.

🏠 Homework

  1. Pick a website you use. List three actions (clicks, form submits, video plays) you would want to track, and for each write the tag name and the trigger condition you would create in GTM.
Want to learn this with a mentor?

CodingClave runs guided, project-based training (28-day, 45-day & 6-month batches).

Explore Training →