Forums Forums PPC GA4 gclid custom definition help.

  • PPC

    GA4 gclid custom definition help.

    Posted by Sunman_Stolas on May 15, 2023 at 6:06 pm

    I am having some trouble adding gclid data to GA4 for my client. They want a report in GA4 of the PPC Keyword next to GCLID as a custom definition. I set up a tag and variable in GTM according to some support docs that I found but I don’t know if they are correct and when I try to create the custom definition in GA4 I am struggling to understand if it should be an event or user and what event parameter I should use to get the gclid to appear.

    In GA4 I have it set as Scope: Event, Event Parameter: Link URL

    In GTM

    * Tag – GA4 Configuration, Property Name gclid, Value Page URL
    * Trigger All Pages
    * Tag – GA4 Event Config Tag: GA4 Config Tag, event name {{Click ID}}
    * Event Parameters – Name gclid, value {{GCLID-VAR}}
    * Variable – GCLID-VAR
    * Variable Type URL, Component Type Query, Query Key gclid

    This is the first time I’ve

    set something like this up and I am seeing a lot of conflicting support material. Any help would be appriciated.

    Sunman_Stolas replied 3 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • bkh_leung

    Guest
    May 15, 2023 at 6:50 pm

    Happy to walk you through the set up through GA4 on a screen share FOC

    I do video tutorials like this all the time on youtube @bkhleung

    But in short, you’ll need to create a variable for keyword as well

    So you’ll have a variable for keyword (query = term) and gclid (query = gclid)

    Then on your GA4 config you’d have to pass these are parameters, you can set default to null to keep the data clean

    If you want to make it cleaner, you can set up a separate event tag for only Google Ads traffic and set the same event params but only trigger on a segment of the traffic

    In your GA4 report, you would have to create custom dimensions for keyword and gclid so you can expose that data in a report (or under the explore tab as GA4, calls)

    Feel free to DM me

Log in to reply.