Reporting purchases/renewals to google ads from server to the initial user
How to properly report conversions back to google ads when they happen on server side?
I guess my usecase is pretty common but I can't seem to find any relevant information:
- user clicks an ad on google
- they are redirected to my website
- they signup for a free trial
- I report the "sign up" event back to google analytics (GA4) using gtag
- the sign up event is linked to google ads as an "offline" event
This works good so far.
Now when trial ends and the user is charged for the first time, I want to further report a "renewal" event with the "value" charged so google ads could further optimise. But how do I do this?
Renewal happens on the server, while I also track the renewal using GA4 api, I'm not sure how to link it to the original user so it can be attributed correctly in GA4 and then in google ads.
Seems like I need to get cookies that google ads create in browser to identify a user when the user first signs up, and then send the cookies to the server and to further pass them to GA4 every time the renewal happens. But I can't see any documentation on that neither.
So how do I report server side events back to GA4/google ads ensuring the even is attributed to the correct user?
As a note, I'm not looking to use Google Tag Manager.
This can be done using the Google Ads API's ConversionUploadService, which allows you to record "offline" conversions from server to server.
You'll need to store the click ID (called gclid—or wbraid/gbraid for iOS) of the ad click that originally brought the user to your site and send that with your renewal conversion.
If you don't want to sign up for the Google Ads API, the option to upload conversions is also available in the web UI.
Thanks, this is really helpful. Do you know how to report a conversion using gtag? I guess there should be a way to pass gclid to gtag, but I again can't see any references in docs.
I suppose you'd need an appropriately set cookie which the gtag snippet could send with the conversion. But that's probably not a supported use case.
gtag sends it somehow anyways. Found the below link where they mention gclid and it seems like I can set it, but not sure how do I verify if google ads receives it correctly. Besides I need to send it via api and not via gtag instance. developers.google.com/tag-platform/gtagjs/reference. Probably my best bet so far is to reverse engineer the source code of gtag to see how they send gclid to the analytics server. I'm still puzzled as it seems to me like a general use case - to report conversions from server, especially to measure renewals/LTV. Anyway, thanks for your help.