Best way to retrieve Conversion ID and Conversion Label from Google Ads API

272 views
Skip to first unread message

thuong le

unread,
May 21, 2020, 11:31:39 PM5/21/20
to AdWords API and Google Ads API Forum
Hi all,

Currently when retrieve a conversion action from api, we only have the snippet tags that include Conversion id and Conversion label, something like this:

“globalSiteTag”: “<!-- Global site tag (gtag.js) - Google Ads: <conversion-id> -->\n<script async src=\“https://www.googletagmanager.com/gtag/js?id=AW-<conversion-id>\“></script>\n<script>\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag(‘js’, new Date());\n\n  gtag(‘config’, ‘AW-<conversion-id>’);\n</script>\n”,
 
“eventSnippet”: “<!-- Event snippet for Store purchases conversion page -->\n<script>\n  gtag(‘event’, ‘conversion’, {\n      ‘send_to’: ‘AW-<conversion-id>/<conversion-label>’,\n      ‘value’: <conversion-default-value>,\n      ‘currency’: ‘<account-currency>’,\n      ‘transaction_id’: ‘’\n  });\n</script>\n”

Is there any better way to get the conversion id and conversion label from api beside extract it using Regex?  I hope that these attributes just return directly from api so we can store it easily.

Thank you and have a nice day.

Google Ads API Forum Advisor Prod

unread,
May 22, 2020, 1:29:02 PM5/22/20
to thuong...@gmail.com, adwor...@googlegroups.com
Hi Thuong,

Thank you for reaching out. Unfortunately, it is not possible to pull any values from within the tag using the API. I have filed a feature request on your behalf so please keep an eye on our Developer Blog for information on future releases.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5004Q1zrBPB:ref

thuong le

unread,
May 23, 2020, 12:33:29 PM5/23/20
to AdWords API and Google Ads API Forum
 Thank you! Looking forward to Google ads api's future releases :) 

Jia Hongchao

unread,
Dec 22, 2021, 2:06:17 AM12/22/21
to AdWords API and Google Ads API Forum
Any update?

Google Ads API Forum Advisor

unread,
Dec 22, 2021, 8:20:46 PM12/22/21
to adwor...@googlegroups.com
Hi Jia,

Thank you for bumping this thread. 

Unfortunately, we have yet to receive updates regarding this feature. For now, you may continue to keep an eye on our blog for announcements.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q1zrBPB:ref

Prathamesh Patel

unread,
Nov 20, 2022, 5:03:56 PM11/20/22
to Google Ads API and AdWords API Forum
It's been a year already and still there is no way to get conversion_label from a tagSnippet. Any updates on this API ?

Google Ads API Forum Advisor

unread,
Nov 21, 2022, 12:27:20 AM11/21/22
to adwor...@googlegroups.com
Hi Prathamesh,


Thank you for bumping this thread. 

To give you an update, on our end, we haven't received any updates yet regarding this feature. For now, you may continue to keep an eye on our blog or release notes for announcements.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q1zrBPB:ref
Reply all
Reply to author
Forward
0 new messages