Posts tagged with google-ads-script

I'm trying to make a call to the Google ADS API through the ga_service.search_stream(my_query) method using the client.get_service("GoogleAdsService"). However i'm getting the error: " Version v10 is deprecated. Requests to this version will be blocked."

I run the print(google.ads.googleads.VERSION) code and I get the response that the installed version is v16.0.0 however I passed the version to GoogleAdsClient like this: GoogleAdsClient.load_from_storage("my_file.yaml", version=" v16")

In response I got the following error: Specified Google Ads API version "v16" does not exist. Valid API versions are: "v10", "v9"

I made the same call to the method GoogleAdsClient.load_from_storage("my_file.yaml", version=" v10") and GoogleAdsClient.load_from_storage("my_file.yaml", version=" v9")

I made the same call to the method GoogleAdsClient.load_from_storage("my_file.yaml", version=" v10") and got response: Version v10 is deprecated. Requests to this version will be blocked."

When I run GoogleAdsClient.load_from_storage("my_file.yaml", version=" v9") I get the response: google.api_core.exceptions.MethodNotImplemented: 501 GRPC target method can't be resolved

Can you help me? This issue may be associated with settings on the GoogleAds platform?

My site has 3 "conversion" events:

  • User signs up for the site by providing their email (GCLID is known and a pixel fires)
  • User starts a free 7-day trial (by submitting a CC) (GCLID is known and a pixel fires)
  • User becomes a full member if CC is charged by Stripe on the 7th day (GCLID is known, no pixel because this occurs at Stripe)

My questions are:

  1. For the first 2 events, which API endpoint is best to send this data to Google to make sure 100% of conversions are attributable via the GCLID?

  2. For the last event, which API endpoint is best since Google will not be aware this subscription took place?

In the campaign setup, I'm optimizing for all 3 events and they are ranked by conversion value (full member is worth say $50, trial is $1, and providing email is $0.50).

I did notice a few threads that appeared similar, but couldn't find a use case that covered both scenarios, so figured I'd ask.

Just to further clarify, it'd be like this in order of events:

  1. User joins newsletter. A pixel fires. I also send this conversion via API for redundancy
  2. User signs up for a free trial. A pixel fires. I also send this conversion via API for redundancy
  3. User becomes a full member after trial ends automatically. A pixel does not fire. I send this conversion via API because there is no pixel and this is the ultimate goal of the campaign.

Three different conversion goals are setup in Measurement > Conversions, the last of which is "offline".

Appreciate any insight or help.

Thanks,

ENDPOINTS CONSIDERED:

For the 3rd event, I was considering using the following:

https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#upload_clickconversion

For the first 2 events, I was considering using the following:

https://developers.google.com/google-ads/api/docs/conversions/enhance-conversions?hl=en

However, when I asked this question in the Google Ads API forum, the answer I received reversed these two, which I am not sure is correct.

Additionally, the documentation related to Google Enhanced Conversions (https://support.google.com/google-ads/answer/9888656?hl=en) state that you can use the Google Ads API for the "set up enhanced conversions for web", but for "set up enhanced conversions for leads" it doesn't specify the Google Ads API is an option.

In that specific context, I'm not clear on which is better to use.

I searched some forums about how to prevent sql injection in python and saw that there are ways to use a code like the following:

nome = "'Carlos' , idade = 80" cursor.execute("UPDATE cliente SET nome=%(nome)s WHERE idcliente=13", ({'nome': nome, }))

Most of the examples I see the variable 'cursor.execute' and an execute next to it, I would like to know how to replicate this in the Google ads API.

I want to know if have some 'cursor.execute' in Google Ads API...