I have implemented server-side tagging in in Google Tag Manager (GTM), but I'm sending HTTP requests directly from my backend code, rather than using JavaScript on the frontend (as many other developers). Since, the conversion tracking cookies set by Meta and Google aren't automatically sent when sending a HTTP request from my backend code, I am getting the _fbp and _fbc cookie values from the context and sending them as a "ep.x-fb-ck-fbp" and "ep.x-fb-ck-fbc" to the GTM server container, which allows me to track Facebook ads conversions successfully.

I am now looking to replicate this process for Google Ads. I understand that for Google Ads conversion tracking, the GCLID is a parameter that sets the _gcl_aw cookie which I should use to track conversion. However, I am not certain how to send this cookie value in the Http request that I'm sending from my server to the GTM server container.

In other words, if I'm sending the Meta's _fbc cookie value as a "ep.x-fb-ck-fbc" parameter, how should I send the Google's _gcl_aw and _gcl_au cookies.

Tag:google-ads-api, google-tag-manager, adsense, facebook-ads-api, google-tag-manager-server-side

Only one comment.

  1. ABU SYAID

    You'll need to send the Google click ID (_gcl_aw) and _gcl_au cookie values to the GTM server container in a similar way to how you're sending the _fbc and _fbp for Meta.

    Here’s how you can structure it:

    Capture the _gcl_aw and _gcl_au cookies: Just like you capture the Facebook cookies (_fbc and _fbp), you need to get the values of the _gcl_aw (Google Click ID for web conversions) and _gcl_au (for Google Ads retargeting purposes) cookies. These cookies are essential for attributing conversions back to the relevant ad clicks.

    Send the cookie values as custom parameters: You can pass the values in a similar fashion, using custom parameter names. For example:

    Send the _gcl_aw value as "ep.gclid" (or any custom key like "ep.x-google-ck-gclid"). You can do the same for _gcl_au, though it's more relevant for remarketing tracking.

    GTM Server-Side Configuration: In your GTM server container, set up a custom tag to process this data. You should create a tag or modify an existing Google Ads Conversion tag to include these parameters, making sure the GCLID (_gcl_aw) is passed properly to Google Ads for attribution.

    Make sure the server-side GTM setup is configured to forward these parameters to Google Ads or any other downstream services for conversion tracking.

Add a new comment.