Simple conversion tracking via curl request from BE

1,504 views
Skip to first unread message

Hilko K

unread,
Oct 21, 2021, 3:21:28 PM10/21/21
to AdWords API and Google Ads API Forum
Hi, 

I would like to add conversion tracking to my ads via requests that I can fire directly from BE instead of using the tag manager FE snippets.

I need this because some of the conversions are done a couple of days later once someone manually updates something on a account that came in via google ad.

Does someone have basic curl examples that I could use to play around with it? 

In my BE I have the gclid which I assume next to the 
Conversion ID and Conversion label should be everything I need or?

While reading up on it I see some complex pre auth things about API access and the need to use some google sdk. I am hoping that its a bit more simple then that and that I could just call some url with auth headers and provide it with my conversion data that then connects to conversion actions in my google ads account. 

Thanks,
Hilko

Google Ads API Forum Advisor

unread,
Oct 22, 2021, 10:07:42 AM10/22/21
to one...@gmail.com, adwor...@googlegroups.com

Hi Hilko,

Thanks for reaching out to us.

Could you please elaborate on acronyms such as FE and BE? Also, could you confirm you’re looking to create conversion actions in Google Ads API

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2QECQ2:ref

Hilko K

unread,
Oct 22, 2021, 4:21:07 PM10/22/21
to AdWords API and Google Ads API Forum
Hi Yasar,
thanks for the fast reply!

Sorry, with FE I mean frontend html/JS code, like the google tag manager snippets, or any interaction that is blocked by privacy focus users, that use adblockers or don't consent to google cookies. (On top of that in the manual systems behind the frontend I would need to trigger the "purchase" conversion anyway in some API way to link an amount that the user generated to its gclid to hopefully let google learn even more about valuable ad impressions.)

With BE I mean Backend, like db analytic jobs or requests fired by rust or other languages that handle manual updates in internal systems.

So I kind of don't want to create a "new" conversion action, but want to trigger a conversion action. Since I can just create them as a one time via the UI just fine. I am not sure if I am at the right place with the Google Ads API to be honest... I am hoping for just a simple rest endpoint to trigger existing conversion actions that where created in the ads portal before. (happy to create new conversion actions how ever needed to solve my case, if its a onetime via google ads API thats probably fine too.)

Cheers,
Hilko

Google Ads API Forum Advisor

unread,
Oct 25, 2021, 11:00:11 AM10/25/21
to one...@gmail.com, adwor...@googlegroups.com

Hi Hilko,

Thanks for getting back to us with the clarification.

Kindly note that triggering or adding conversion tracking is not supported in the Google Ads API. Our team is not familiar with REST endpoints to trigger existing conversion actions that were created in the ads portal since this is outside of support scope. 

As previously mentioned, in Google Ads API perspective, you may create conversion actions described here.

Let us know if you have any further questions.

Regards,

Hilko K

unread,
Oct 25, 2021, 12:28:13 PM10/25/21
to AdWords API and Google Ads API Forum
Hi Yasar,

After searching a bit I found this API https://developers.google.com/google-ads/api/docs/samples/upload-offline-conversion
Wouldn't that cover my case? like been able to tigger conversion tracking via Google Ads API?
If not do you know who or which team I could ask for more infos about this functionality? 

The upload Offline conversion API is a bit big, as all the examples need a sdk and are not that simple to fire from non sdk languages I would assume.

Cheers,
Hilko

Google Ads API Forum Advisor

unread,
Oct 26, 2021, 3:31:15 AM10/26/21
to one...@gmail.com, adwor...@googlegroups.com
Hi Hilko,

Thank you for the replies. I am also a member of the Google Ads API team and let me provide support to your concern.

To have a clearer view on what you mean for triggering conversion tracking, would you be able to provide more details to this? If you can provide related documents on how it is working on the UI, then it will be helpful on our checking.

Also, if what you mean is to upload conversion in an account, then you may refer to this document instead. Then, if you are looking to know how to implement it using REST API, then this is the document that you may check as it presents details specific to REST and explains what you need to know to call the REST interface directly. To know how to construct the body of the API request, then you can check this section.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2QECQ2:ref

Jonathan Howden

unread,
Jan 5, 2022, 5:08:08 PM1/5/22
to AdWords API and Google Ads API Forum
Was there ever a resolution to this? I am encountering the same issue where right now we are using the Google Tag manager to trigger purchase conversion events in javascript (ex: `gtag('event', 'conversion', {send_to: "<conversion_id>/<conversion_label>, value: 1.0, currency: "USD", transaction_id: 1234});`). In this case, we already have the conversion action created in Adwords. However, we want to switch from the previously mentioned javascript snippet to using the Google Ads API to send the same purchase conversion event from the server instead and still linking the conversion event to the existing conversion action. It is not clear from the documentation what endpoint to use in this instance.

Thanks.

Google Ads API Forum Advisor

unread,
Jan 5, 2022, 9:49:51 PM1/5/22
to adwor...@googlegroups.com
Hi Jonathan,

Thank you for the reply.

If you want to switch to the Google Ads API for uploading offline conversion, then you will need to set up your API environment by referring to this link. Then, you may refer to this document as it discusses how to manage offline conversion using API.

Let me know if you have questions with the provided support.

Jonathan Howden

unread,
Jan 5, 2022, 10:25:53 PM1/5/22
to AdWords API and Google Ads API Forum
This is not for offline conversions though. This is for the normal conversion workflow that goes through the normal website flow. 

Google Ads API Forum Advisor

unread,
Jan 6, 2022, 1:47:25 AM1/6/22
to adwor...@googlegroups.com
Hi Jonathan,

Included in the document that I provided the instruction on how to manage the offline conversion. You may refer to the specific documents below for uploading offline click conversion and offline call conversion, which is also included in this provided document:
https://developers.google.com/google-ads/api/docs/conversions/upload-clicks
https://developers.google.com/google-ads/api/docs/conversions/upload-calls
Reply all
Reply to author
Forward
0 new messages