Don't have one? Create one ↗
← All courses
Lessons in this module

Lesson 18 of 20

Read A Server Hit

① Connect your GTM container

Paste your container ID to load it into this page. It only ever runs here.

Advanced: use a specific environment

Your collector received a hit in the last lesson. Now let's read one properly. A GA4 hit is a /g/collect request carrying one or more events, and every piece has an address: en is the event name, tid the measurement id, cid the client id, and every custom parameter travels as ep.name (or epn.name for numbers).

In a real server container, a GA4 client claims a request exactly when it recognizes this shape, then unpacks it into the event data object that server-side tags read. The Server view below does the same unpacking, so you can see both layers: the raw query string, and the clean object it becomes.

The three buttons push three distinct events with custom params. Your tags carry them to your collector; your job is to find each one's en, spot the ep.* params, and watch them land in the parsed object.

Goal

Send three named events through your tags and read each one's anatomy in the server view.

Build it in GTM

  1. Keep your transport setting from the last lesson

    Your Google tag's server_container_url should still point at your collector URL. Every GA4 hit for that measurement id routes through it, including event tags.
  2. One Custom Event trigger for all three

    Triggers → New → Custom Event, event name plan_selected|theme_changed|help_opened, and tick Use regex matching. One trigger, three events.
  3. One GA4 event tag that echoes the event name

    Create a GA4 Event tag, set Event Name to {{Event}} (the built-in variable), and fire it on your new trigger. Bonus: add an event parameter like plan mapped to a Data Layer Variable and find it in the hit as ep.plan.
  4. Preview the live page and press all three buttons

    Connect GTM Preview to the live URL, click each button, and watch the Server view: the newest hit is highlighted, expand it to compare the raw query with the parsed object.

Debug in Tag Assistant

Copy this lesson's live URL and paste it into GTM Preview, that is the page Tag Assistant connects to. It has the clickable elements, so this page stays clean for reading.

  1. In your GTM, click Preview.
  2. Paste the live URL above and click Connect.
  3. Interact with the live page and watch your tag fire in Tag Assistant.

What you should expect to see

Each button click shows up twice: in Tag Assistant as your GA4 event tag firing, and seconds later in the Server view as a fresh hit. In the raw query, look for en=plan_selected and params like ep.plan=pro and epn.seats=5; in the parsed object they become event and plain plan / seats keys.
0 of 20 lessons complete
Was this lesson helpful?