How to retrieve conversion action ids of campaign

45 views
Skip to first unread message

san...@knorex.com

unread,
Dec 16, 2021, 2:50:44 AM12/16/21
to AdWords API and Google Ads API Forum
Hi, I have some questions:
1) How to get conversion ids from custom conversion goal.
Here is query: 
SELECT
  conversion_goal_campaign_config.campaign,
  conversion_goal_campaign_config.custom_conversion_goal,
  conversion_goal_campaign_config.goal_config_level,
  campaign.id,
  campaign.name,
  custom_conversion_goal.name,
  custom_conversion_goal.status,
  custom_conversion_goal.conversion_actions
FROM conversion_goal_campaign_config
WHERE campaign.id = xxx
Response: There is no conversion ids
"customConversionGoal": {
"resourceName": "customers/9112513321/customConversionGoals/6444485347",
"id": 0,
"name": "BG Demo Conversion",
"conversionActions": [
{
"value": {},
"hash": 0,
"serialPersistentFields": {},
"CASEINSENSITIVEORDER": {}
}
],
"status": 2
}
2. Create custom conversion: 
What should be in param "conversion_actions[]"? Are they conversion ids?
3. How to get conversion ids from campaign goal?

Thanks!

san...@knorex.com

unread,
Dec 16, 2021, 4:31:49 AM12/16/21
to AdWords API and Google Ads API Forum
4. How to add many custom goals to campaign?
There is only 1 param "custom_conversion_goal".

Google Ads API Forum Advisor

unread,
Dec 16, 2021, 4:51:14 PM12/16/21
to san...@knorex.com, adwor...@googlegroups.com
Hi Martin,

I tried your report and received Id's. Could you privately send us a request and response log of API communication that returns this funny response? 

The request and response appears similar to the JSON Mappings in our REST documentation. Our client libraries have loggers with logging instructions, to see these instructions you can click on the client library you use in the sidebar of our client library guide and click on "Logging". Setting the logger to 'DEBUG' will get the desired log.

Regarding params "conversion_actions[]", usually we require full resourceNames for similar fields but the documentation isn't clear here. I tried and it needs the full resource name of the conversion action. The error when not using a full resource name was 'expected 'customers/{customer_id}/conversionActions/{conversion_action_id}'.

'conversion_goal_campaign_config' has the resource names of the conversion actions linked to the campaign.

You only need one custom_conversion_goal for a campaign, the goal has in it multiple conversion actions.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


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