How to get Conversion ID & Conversion Label from API?

2,032 views
Skip to first unread message

Michael Michelis

unread,
Apr 2, 2021, 6:25:38 AM4/2/21
to AdWords API and Google Ads API Forum
Hi,

My goal is to extract the custom HTML snippet from my Conversions. The way I see it is all I need is the Conversion ID & Conversion Label.
What I've tried is the ConversionTrackerService. The response I am getting is:

Conversion:  {
    'totalNumEntries': 2,
    'Page.Type': 'ConversionTrackerPage',
    'entries': [
        {
            'id': 5354xxxxx,
            'originalConversionTypeId': None,
            'name': 'Purchase',
            'status': 'ENABLED',
            'category': 'PURCHASE',
            'googleEventSnippet': None,
            'googleGlobalSiteTag': None,
             ...
The id in this response is different to the <!-- Global site tag (gtag.js) - Google Ads: 3912xxxxx--> that I see in the UI

I would expect that googleGlobalSiteTag would not be None and would allow me to see the tag I see in the UI. Am I am missing something? Or is there another way to get this information?

Any help highly appreciated!

Google Ads API Forum Advisor Prod

unread,
Apr 5, 2021, 10:35:21 AM4/5/21
to m89.mi...@gmail.com, adwor...@googlegroups.com

Hi Michael,

Thank you for reaching out. The returned results in the response showed that the conversion tracker does not use snippets. Please make sure the conversion tracker had the googleGlobalSiteTag Set up correctly. If you still have concerns, please share the complete request and response logs along with the screenshots of the UI that show the discrepancy via the Reply privately to author option for us to further investigate.

Thanks and regards,
Xiaoming, Google Ads API Team


Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2EpMSZ:ref

Michael Michelis

unread,
Apr 6, 2021, 1:48:08 PM4/6/21
to AdWords API and Google Ads API Forum
Hi Xiaoming,

Thank you for your response.
I haven't installed the snippet on any website yet if that's what you are asking.

My goal is to get the Conversion ID & Conversion Label from Google API once I create a new conversion and install the Conversion Tracker snippet on a website dynamically before installing the snippet manually. Is there a way to get this information from the API? I can see that the snippet is available on the UI, but I get an empty response from the API for this.

Looking forward to your reply.

Best,
Michael

Google Ads API Forum Advisor Prod

unread,
Apr 6, 2021, 3:20:47 PM4/6/21
to m89.mi...@gmail.com, adwor...@googlegroups.com

Hi Michael,

Thank you for reaching out. You could fetch the conversion_action.id from the conversion_action resource. Once you have the conversion id, you could use it in the global tag snippet and install it on each page of your website. You could also use Google Tag Manager to achieve it. Please refer to this article for more information.



Thanks and regards,
Xiaoming, Google Ads API Team

Souvik Basu

unread,
Jul 31, 2023, 5:26:50 PM7/31/23
to Google Ads API and AdWords API Forum
HI Michael,

Sorry for the trouble, but were you able to get the conversion label?

Regards
Souvik

Google Ads API Forum Advisor

unread,
Aug 1, 2023, 1:24:26 AM8/1/23
to sou...@twyzle.com, adwor...@googlegroups.com

Hi Souvik,

Thank you for reaching out to us.

Kindly note that you can see what conversion action attributes are available via the API here: https://developers.google.com/google-ads/api/fields/v14/conversion_action. With that being said, upon checking, it seems that the conversion label you are referring to is the conversion_action.name (https://developers.google.com/google-ads/api/fields/v14/conversion_action#conversion_action.name). However, if this is not what you are referring to, then you may please provide us with the entire UI screenshot without cropping where you can see this so that we can further check this and provide you with an appropriate answer.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2EpMSZ:ref"

Thanks,
 
Google Logo Google Ads API Team


Souvik Basu

unread,
Aug 2, 2023, 7:41:24 AM8/2/23
to Google Ads API and AdWords API Forum
Hi,

Thanks for the reply, But by conversion id and conversion label I meant the ones that is required in GTM while creating a Google ads tags(Google ads conversion tracking).

To be more precise please check the screenshot
Screenshot 2023-08-02 at 12.39.46 PM.png
Regards
Souvik

Google Ads API Forum Advisor

unread,
Aug 2, 2023, 12:31:44 PM8/2/23
to sou...@twyzle.com, adwor...@googlegroups.com

Hello Souvik,

Thank you for getting back to us.

Upon checking, obtaining these data via API is not yet available. However, our team already raised a feature request for this to become available in the API. Kindly note that this is a subject for review and what we can do is to advise you to keep an eye on our blog post for the updates and releases.

j...@eulerity.com

unread,
Feb 15, 2024, 5:02:48 PM2/15/24
to Google Ads API and AdWords API Forum
We are also interested in obtaining the conversion id and label from the API. Is there an issue I can subscribe to?

Google Ads API Forum Advisor

unread,
Feb 16, 2024, 3:11:54 AM2/16/24
to j...@eulerity.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

I would like to inform you that you cannot obtain the conversion id and label from the Google Ads API. I will raise a request for this feature to become available in the Google Ads API. However, I cannot provide a scheduled timeline for its availability in the API. So, I would recommend you to follow our Blog Post and Release Notes for future updates.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02EpMSZ:ref"


Thanks,
 
Google Logo Google Ads API Team


j...@eulerity.com

unread,
Jun 18, 2024, 4:35:37 PM6/18/24
to Google Ads API and AdWords API Forum
The solution I'm using is getting the conversion actions snippets:

SELECT conversion_action.tag_snippets FROM conversion_action"


And parsing with the following Java pattern:

 Pattern.compile(".*'send_to': 'AW-([^/]+)/([^']+)'.*", Pattern.DOTALL);

group 1 is the id and group 2 is the label


Google Ads API Forum Advisor

unread,
Jun 18, 2024, 5:04:34 PM6/18/24
to j...@eulerity.com, adwor...@googlegroups.com
Hi,

For now, you may continue using the solution that you have mentioned to get the conversion id and label. Our team already raised a feature request to add this feature to be available in the Google Ads API, subject for review. We cannot provide a scheduled timeline for the availability of this feature in the Google Ads API. I would recommend you please follow our Blog Post and Release Notes for future updates.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02EpMSZ:ref" (ADR-00062846)

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!
 


Reply all
Reply to author
Forward
0 new messages