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.

I have deployed my webhook and connected my WABA. Once I send an image to this business account. It did not return the media id from the response. Actually, the JSON returned to me like this:

{     "entry": [         {             "changes": [                 {                     "field": "messages",                     "value": {                         "contacts": [                             {                                 "profile": {                                     "name": "XXXXXXX"                                 }                             }                         ],                         "messages": [                             {                                 "from": "XXXXXXXXXX",                                 "id": "wamid.aisjdoiajsodiajsodasd\u003d",                                 "timestamp": "1657527108",                                 "type": "image"                             }                         ],                         "metadata": {}                     }                 }             ],             "id": "124071984791824"         }     ],     "object": "whatsapp_business_account" } 

Or should I try the Whatsapp On-premises API? https://developers.facebook.com/docs/whatsapp/on-premises/reference/media/media-id

As I mentioned above, are there any API's available for uploading status (text, images and videos etc.) in the WhatsApp Businesses platform? For businesses messaging we can use Cloud API https://developers.facebook.com/docs/whatsapp/cloud-api or On-Premises API https://developers.facebook.com/docs/whatsapp/on-premises . Like messages API's, I am searching for status uploading API's. If anyone knows about this please guide me.

I've installed WhatsApp business client on my linux docker containers, I have managed to hit the /v1/health route perfectly and have also changed the default password through an endpoint.

But, I'm getting an error when I try to access POST request /v1/contacts . The error is:

{     "meta": {         "version": "v2.41.2",         "api_status": "stable"     },     "errors": [         {             "code": 1014,             "title": "Internal error",             "details": "Connection refused. Please check if wacore is running: wacore:6251"         }     ] } 

However, my wacore container is indeed running:

Docker Container Image

P.S: Some questions already posted here with similar titles don't solve my issue.

I'm trying to get campaign information with Google ADS API. The sample code snippet I used is from the official googleads github repo.

import argparse import sys from google.ads.googleads.client import GoogleAdsClient from google.ads.googleads.errors import GoogleAdsException _DEFAULT_PAGE_SIZE = 1000 # [START get_campaigns_by_label] def main(client, customer_id, label_id, page_size):     """Demonstrates how to retrieve all campaigns by a given label ID.     Args:         client: An initialized GoogleAdsClient instance.         customer_id: A client customer ID str.         label_id: A label ID to use when searching for campaigns.         page_size: An int of the number of results to include in each page of             results.     """     ga_service = client.get_service("GoogleAdsService")     # Creates a query that will retrieve all campaign labels with the     # specified label ID.     query = f"""         SELECT             campaign.id,             campaign.name,             label.id,             label.name          FROM campaign_label          WHERE label.id = "{label_id}"          ORDER BY campaign.id"""     # Retrieves a google.api_core.page_iterator.GRPCIterator instance     # initialized with the specified request parameters.     request = client.get_type("SearchGoogleAdsRequest")     request.customer_id = customer_id     request.query = query     request.page_size = page_size     iterator = ga_service.search(request=request)     # Iterates over all rows in all pages and prints the requested field     # values for the campaigns and labels in each row. The results include     # the campaign and label objects because these were included in the     # search criteria.     for row in iterator:         print(             f'Campaign found with ID "{row.campaign.id}", name '             f'"{row.campaign.name}", and label "{row.label.name}".'         ) if __name__ == "__main__":     # GoogleAdsClient will read the google-ads.yaml configuration file in the     # home directory if none is specified.     googleads_client = GoogleAdsClient.load_from_storage(version="v10")     parser = argparse.ArgumentParser(         description="Lists all campaigns for specified customer."     )     # The following argument(s) should be provided to run the example.     parser.add_argument(         "-c",         "--customer_id",         type=str,         required=True,         help="The Google Ads customer ID.",     )     parser.add_argument(         "-l",         "--label_id",         type=str,         required=True,         help="A label ID associated with a campaign.",     )     args = parser.parse_args()     try:         main(             googleads_client,             args.customer_id,             args.label_id,             _DEFAULT_PAGE_SIZE,         )     except GoogleAdsException as ex:         print(             f'Request with ID "{ex.request_id}" failed with status '             f'"{ex.error.code().name}" and includes the following errors:'         )         for error in ex.failure.errors:             print(f'\tError with message "{error.message}".')             if error.location:                 for field_path_element in error.location.field_path_elements:                     print(f"\t\tOn field: {field_path_element.field_name}")         sys.exit(1) 

When I run the above .py file, I get the following error.

ValueError: Specified Google Ads API version "v10" does not exist. Valid API versions are: "v8", "v7", "v6" 

But when I change the version on "GoogleAdsClient.load_from_storage(version="v10")" to v8, this time I get the following error.

Request made: ClientCustomerId: XXXXXXX, Host: googleads.googleapis.com, Method: /google.ads.googleads.v8.services.GoogleAdsService/Search, RequestId: XXXXXXXXX,IsFault: True, FaultMessage:  Version v8 is deprecated. Requests to this version will be blocked. 

By the way, I'm sure the google-ads package is up to date. Previously, I ran the following.

pip uninstall google-ads pip install google-ads 

Thanks in advance for your help.