See the Google Ads GCLID in GA4

How to capture the Google Ads GCLID on every page view with PixelYourSite and see it inside a standard GA4 Pages report, no Explorations needed.

Get expert tracking tips in your inbox

Join 65,000+ marketers and site owners who already get our best guides on Meta Pixels, CAPI, GA4, Google Ads, TikTok & Pinterest tracking, GDPR, and more.

* We don’t spam, and all our emails have an “Unsubscribe” link that works. 

Every now and then someone asks how to see the actual GCLID in GA4. Fair question, because by default you can’t. GA4 knows a session came from Google Ads, but not which specific click. Two visitors from the same campaign look identical in your reports.

The fix takes three settings in PixelYourSite and one in GA4. The result is a standard Page views report you can filter and sort by GCLID. No Explorations required.

What the GCLID is

Every click on a Google Ad drops ?gclid=Cj0KCQ... on the landing URL. That’s Google Ads’ internal reference to the exact campaign, ad group, keyword, and auction that brought the visitor. Google Ads uses it internally. Your GA4 reports don’t show it unless you send it in yourself.

Setup

1. Let PixelYourSite control the page_view event

By default, the Google Analytics tag fires its own page view when it loads. PixelYourSite can take that job over, which is what lets you attach your own parameters to page views.

PixelYourSite Pro → Google Analytics → your GA4 property → Control the page_view event.

Turn it on. The automatic Google page view stops firing. PYS fires one instead with the same data plus whatever global parameters you add.

2. Add a global parameter for page views only

Same screen, in the Global Parameters section, add a new parameter:

  • Name: gclid
  • Value: [url_gclid]
  • Check the “Just for page view” box so the parameter only rides along on the page_view event and doesn’t clutter every other event.

The [url_gclid] placeholder is provided by the PYS Super Pack add-on. Super Pack introduces dynamic placeholders in the [url_XXX] format that read the value of any URL parameter at page-load time. Without Super Pack installed and licensed, PYS treats [url_gclid] as a plain string, not a live value. So Super Pack is a hard requirement for this strategy.

Once set up, every page view PYS sends to GA4 carries a gclid parameter. When the URL has no GCLID (organic, direct, anything not from a Google Ad), the placeholder resolves to empty and GA4 skips it. When there is one, the value travels with the page view.

3. Register the custom dimension in GA4

Event parameters don’t appear in GA4 reports until you register them.

GA4 → Admin → Custom definitions → Custom dimensions → Create custom dimension.

  • Dimension name: GCLID
  • Scope: Event
  • Event parameter: gclid

Save. Wait 24 to 48 hours. GA4 doesn’t backfill data collected before the dimension existed.

4. Report on it

Reports → Engagement → Pages and screens. Open the customise pencil, add GCLID as a secondary dimension. The table now breaks down each page by the GCLID that brought the visitor. Sort by views, engagement, or conversions to see which specific ad clicks drove which behaviour.

That’s the report. Standard GA4, no Exploration needed.

What you can do with it

  • See which specific ad click brought a visitor to which page.
  • Spot GCLIDs with high views but low engagement or no conversions. Those are clicks you paid for and got nothing back.
  • Export the report and cross-reference against Google Ads’ own click reports for keyword-, ad-, or match-type-level analysis you can’t do in either tool alone.

Things worth knowing

  • Only Google Ads clicks have a GCLID. Every other visit shows empty. That’s expected, not a bug.
  • PYS takes over the page view cleanly. No duplicate page views: the automatic Google one is turned off when PYS takes over.
  • Register the dimension before you turn the parameter on if you can. Otherwise the first couple of days of data get collected but stay invisible until the dimension is live.
  • Consent Mode still runs the show. If the visitor declined analytics consent, no page view goes to GA4, GCLID or not.

Don’t stop here!

Subscribe to get more tips on tracking, analytics, and GDPR.

We’ll send you practical guides on Meta Pixel, CAPI, GA4, Google Ads, TikTok, Pinterest, GDPR compliance, and more, right to your inbox.

* We don’t spam, and all our emails have an “Unsubscribe” link that works. 

See the Google Ads GCLID in GA4

How to capture the Google Ads GCLID on every page view with PixelYourSite and see it inside a standard GA4 Pages report, no Explorations needed.

Find out when we have the next BIG OFFER!

Over 70 000 business-owners have access to our BIG DISCOUNTS. Don't miss the next one: