Learn business growth with Google Analytics 4 Forums Google Analytics 4 Connecting server-side purchases/renewals with initial ad clicks on Google Ads

  • Connecting server-side purchases/renewals with initial ad clicks on Google Ads

    Posted by Harry on 14 August 2022 at 4:07 am

    Yo, anyone knows how to report conversions back to Google Ads when they happen server-side? It’s not rocket science but I’m kinda stuck.

    • A user clicks a Google ad
    • They get redirected to my site
    • They signup for a free trial
    • I report this “sign up” event back to Google Analytics (GA4) using gtag
    • The sign up event is marked as an “offline” event in Google Ads

    That’s all good. But then, when the trial ends and I charge the user the first time, I want to report a “renewal” event with the charge amount to help Google Ads optimize. But how do I do this?

    The renewal happens server-side. While I track it using the GA4 API, I can’t figure out how to link it to the original user. This means it could be attributed correctly in GA4 and Google Ads.

    It looks like I need to grab the cookies Google Ads create in the browser when the user first signs up. Then send these cookies to the server and pass them to GA4 every time a renewal happens. But there’s no documentation I can find on this.

    Anyone knows how to report server-side events to GA4/Google Ads such that it’s attributed to the right user?

    Note: I’m not looking to use Google Tag Manager.

    Lily replied 1 year, 3 months ago 3 Members · 2 Replies
  • 2 Replies
  • Jacob

    Member
    8 November 2022 at 10:48 pm

    Absolutely, you can handle this by using the Google Ads API’s ConversionUploadService. This service lets you record “offline” or server-side conversions. The key is to keep track of the ad click that originally brought the user to your site, this is done by storing the click ID, referred to as ‘gclid’ – or if it’s for iOS, it’s ‘wbraid’ or ‘gbraid’. Then, when the renewal happens, you send this click ID along with your conversion data.

    But in case you prefer not dealing with the Google Ads API directly, you can upload your conversions through the web user interface as well. You can find this option handily available in there.

  • Lily

    Member
    4 April 2023 at 2:37 pm

    Sure thing! To report server-side conversions to Google Ads, you need to use the Google Ads Conversion Tracking tag or the Google Ads API to report conversions directly from your server. To attribute conversions to the original user, pass the Google Click Identifier (GCLID), which is stored in a cookie when the user first clicks on the ad, along with the conversion details from your server.

Log in to reply.