Question related to ConversionActionID of ConversionAction while uploading offline conversions in Google Ads API

63 views
Skip to first unread message

Anjana Sagathiya

unread,
Feb 10, 2022, 11:13:06 PM2/10/22
to Google Ads API and AdWords API Forum
  I need your help.I am integrating Google Ads Api and by using this I push offline conversion in Google Ads.But there is one parameter ConversionAction and in that we need to pass ConversionActionId.can you tell me what is ConversionActionId and from where I can find it?I couldn't find it from Google Ads UI.Please help me.

Jana lebski

unread,
Apr 27, 2022, 11:09:09 AM4/27/22
to Google Ads API and AdWords API Forum
Hi
I deal with it too.
Here you can see how to build Google Ads Query  
For example :
SELECT conversion_action.id, conversion_action.name, conversion_action.type, conversion_action.status, conversion_action.resource_name, conversion_action.app_id FROM conversion_action WHERE conversion_action.name = 'ConversionName'
C#:
long customerId = 11111;
 GoogleAdsClient client = new GoogleAdsClient();
GoogleAdsServiceClient googleAdsService = client.GetService( Services.V10.GoogleAdsService);
 string query = "SELECT conversion_action.id, conversion_action.name, conversion_action.type, conversion_action.status, conversion_action.resource_name, conversion_action.app_id " +
                "   FROM conversion_action WHERE conversion_action.name = 'OfflineSales'";

            SearchGoogleAdsRequest request = new SearchGoogleAdsRequest()
            {
                CustomerId = customerId.ToString(),
                Query = query
            };

  GoogleAdsRow googleAdsRow = googleAdsService.Search(request).First();


Examples how  to run

Google Ads API Forum Advisor

unread,
Apr 28, 2022, 2:01:02 PM4/28/22
to jle...@dufresne.ca, adwor...@googlegroups.com
Hi everyone, 

Jana is correct. The 'conversion_action.resource_name' field has the resource name that is passed to the API. Depending on how the client library sets up the resource name you may only need 'conversion_action.id'.  In our C# example the code puts together the customer Id and the conversion action Id so all you need is the Id part.

Regards,

Google Logo
Aryeh
Google Ads API Team
 


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