Campaign Goal API endpoint

446 views
Skip to first unread message

AMAP TEST

unread,
Jan 13, 2022, 12:18:07 PM1/13/22
to Google Ads API and AdWords API Forum
Hi Team,

Can you please help us know which API endpoint should be invoked to configure Goals at Campaign level ?
On GUI we see selection available to configure Goal(Snippet attached here)

To configure the same via API, let me know which endpoint is to be invoked.

Or is there an endpoint available for this configuration 
Capture.PNG

Google Ads API Forum Advisor

unread,
Jan 14, 2022, 1:50:36 AM1/14/22
to amap.acce...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to our API support team.

You can find here, the guide regarding conversion / campaign goals. This guide then provides more information on how you may manage your campaign goals.

You can then use the below services :  If you are using the REST interface, you can refer to the below documentation instead : Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ujk53:ref

AMAP TEST

unread,
Jan 17, 2022, 9:39:53 AM1/17/22
to Google Ads API and AdWords API Forum
Hi Team,

Tried following the document refrence that was shared but no lunk.
Please validate if there is something being missed .
We are unable to update Campaign Conversion Goal. Following are the steps configured 

1. Created a ConversionAction and Tagged it to a Campaign
{
    "operations": [
        {
             "updateMask": "primaryForGoal",
            "update": {
                "resourceName": "customers/5511294223/conversionActions/841733022",
                "status": "ENABLED",
                "type": "WEBSITE_CALL",
                "origin": "WEBSITE",
                "primaryForGoal": false,
                "category": "PHONE_CALL_LEAD",
                "name": "StoreVisitConversion",
                "includeInConversionsMetric": true
            }
        }
    ],
    "partialFailure": false,
    "validateOnly": false
}

2. Tried Creating CampaignConversionGoal and i always get error response . Create operation is not supported for this method .
Request:
{
    "validateOnly": false,
    "operations": [
        {
            "updateMask": "category,origin,biddable",
            "update": {
                "resourceName": "customers/5511294223/campaignConversionGoals/15855767503~DEFAULT~WEBSITE",
                "campaign": "15855767503",
                "category": "DEFAULT",
                "origin": "WEBSITE",
                "biddable": true
            }
        }
    ]
    
}
Response:
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "mutateError": "RESOURCE_NOT_FOUND"
                        },
                        "message": "Resource was not found.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                }
                            ]
                        }
                    }
                ],
                "requestId": "IlzwTDtACKU4ID1H7w8eow"
            }
        ]
    }
}

3. Even tried last option of setting ConversionGoalCampaignConfig. But no luck here as well. I get the same error response
Request:
{
    "operations": [
        {
            "updateMask": "goalConfigLevel",
            "update": {
                "resourceName": "customers/5511294223/conversionGoalCampaignConfigs/15855767503",
                "campaign": "15855767503",
                "goalConfigLevel": "CAMPAIGN"
            }
        }
    ],
    "validateOnly": false
}
Response:
{
    "error": {
        "code": 400,
        "message": "Request contains an invalid argument.",
        "status": "INVALID_ARGUMENT",
        "details": [
            {
                "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure",
                "errors": [
                    {
                        "errorCode": {
                            "requestError": "UNKNOWN"
                        },
                        "message": "The error code is not in this version.",
                        "location": {
                            "fieldPathElements": [
                                {
                                    "fieldName": "operations",
                                    "index": 0
                                }
                            ]
                        }
                    }
                ],
                "requestId": "cx9pMn2JXcHvtNF1TrynuQ"
            }
        ]
    }
}
Can you please help where am i going wrong ? the process is first we need to set the ConversionAction at Campaign level and then we can set the campaignConversion Goal right? Setting up campaignConversionGoal via API will setup Goal parameter on graphical UI of a Campaign in GADS ?

Why do i get a null response even if i have conversionAction present in my Account via Query language ?


Appreciate response for the same.

Google Ads API Forum Advisor

unread,
Jan 18, 2022, 1:35:33 AM1/18/22
to amap.acce...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for getting back to us.

The reason you got RESOURCE_NOT_FOUND in your created CampaignConversionGoal API request is due to the provided resource name not being in your account. Here’s the below GAQL I used to check for your account:

SELECT campaign_conversion_goal.resource_name, campaign_conversion_goal.origin, campaign_conversion_goal.category FROM campaign_conversion_goal WHERE campaign.id = 15855767503

With regards to setting ConversionGoalCampaignConfig, I could not find the resource name that you’re trying to update. Here’s the below GAQL I used to check for your account:

SELECT conversion_goal_campaign_config.resource_name, conversion_goal_campaign_config.campaign FROM conversion_goal_campaign_config WHERE campaign.id = 15855767503

You would need to ensure that said resource names already exist in your account in order to perform update actions successfully. 

Let us know if you have any further questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ujk53:ref

AMAP TEST

unread,
Jan 18, 2022, 2:30:59 AM1/18/22
to Google Ads API and AdWords API Forum
Hi Team,

This is pretty confusing to me now.... 
CampaignConversionGoalAPI just has Update Operation .  So how can i get the resource name that has already been created ?
Which endpoint is used to create/get CampaignConversionGoal associated with a Campaign ?
Should we create this on GUI somewhere ? If so can you share me the steps to create CampaignConversionGoal please ?

I ran  GAQL to see the CampaignConversionGoal resource name but i get a blank response (GAQL Query for Campaign Goal Screen shot attached )

All that i am trying to achieve here is to set the Goal for a campaign (Highlighted in my second screen shot attached ). Is CampaignConversionGoal the correct endpoint to achieve this feature ? Or this field cannot be set today via an API ?


Appreciate your response to my questions above

GAQL Query for CampaignGoal.PNG
Goal Setup.PNG

Google Ads API Forum Advisor

unread,
Jan 18, 2022, 11:26:06 AM1/18/22
to amap.acce...@gmail.com, adwor...@googlegroups.com
Hi,

I work with Yasar and will assist you. What you are experiencing could be because we have not yet enabled the conversion goals feature for your account (enabling goals will happen gradually across all accounts). When we do enable the feature for that account, the following query will return CustomerConversionGoal objects for each combination of origin and category found in the customer's ConversionActions.
SELECT customer_conversion_goal.category, customer_conversion_goal.origin, customer_conversion_goal.biddable 
FROM customer_conversion_goal

Regarding not being able to create the campaign goal object, this is working as intended. When your account is enabled for the conversion goals feature then every campaign will have a conversion goal, no need to create one. You can then modify the campaign conversion goal if you want that campaign to have a different goal than the account.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 
​​​​​​​

ref:_00D1U1174p._5004Q2Ujk53:ref

AMAP TEST

unread,
Jan 19, 2022, 1:13:28 AM1/19/22
to Google Ads API and AdWords API Forum

Hi Aryeh,

If i absorbed your statement correctly , what is being told is until GOAL is enabled on our Account, we will not be able to proceed with GOAL Modification of Campaigns present in our Account via REST API's ?.

Google Ads API Forum Advisor

unread,
Jan 19, 2022, 9:20:53 AM1/19/22
to amap.acce...@gmail.com, adwor...@googlegroups.com

Hi,

Yes, you are correct. Until campaign GOAL is enabled on your account, we will not be able to modify the campaign goal. There is no way to set the goal using the API. You will have to do it manually in the UI.  There is a feature request to support this functionality in the Google Ads API. Please keep an eye on our blog for the announcements and updates on new releases.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ujk53:ref

AMAP TEST

unread,
Jan 25, 2022, 8:44:37 AM1/25/22
to Google Ads API and AdWords API Forum
Team,

To enable CampaignGoal on our Account what is the steps to be followed ? Is there any request that we need to raise to Support Team?
Basically i want to enable GOAL setting via a REST API.

Google Ads API Forum Advisor

unread,
Jan 26, 2022, 1:26:20 AM1/26/22
to amap.acce...@gmail.com, adwor...@googlegroups.com

Hello,

 

I'm a colleague of Yasar from the Google Ads API Team. 

 

As my colleague mentioned, creating campaign goals are not yet supported in the API. We have already raised a feature request regarding this so there's no action needed on your end. Based from our documentation, since Google Ads automatically creates CustomerConversionGoal, CampaignConversionGoal, and ConversionGoalCampaignConfig objects in your account, you can only update those objects. The Google Ads API does not support creating or removing those objects.

 

Regarding the steps to enable campaign goals in your account, you may reach out to the Google Ads support team for guidance as they are better equipped to assist you on this.

 

Regards,

Google Logo
Kevin Gil Soriano
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ujk53:ref

AMAP TEST

unread,
Jan 27, 2022, 2:16:36 AM1/27/22
to Google Ads API and AdWords API Forum
Hi Kevin,

Okay i get your point on Campaign Goal creation not supported yet . 
But as per your documentation it clearly says :
When you create the conversion action, Google Ads will automatically perform the following steps:
  • Create a CustomerGoal for the conversion action's category and origin if one does not already exist.
  • Create a CampaignGoal for each campaign and the conversion action's category and origin if one does not already exist.
 But when i perform a query to extract CustomerGoal and the CampaignGoal , i get a null value from the Query response.
And when i had raised this point above, it was told that GOAL is not enabled on my account (Statement Told: Until campaign GOAL is enabled on your account, we will not be able to modify the campaign goal). Henceforth, i am unable to get the response for the following queries(I get a NULL value on all these queries). 

CustomerGoal:

SELECT
  customer_conversion_goal.category,
  customer_conversion_goal.origin,
  customer_conversion_goal.biddable
FROM customer_conversion_goal


CampaignGoal:
SELECT
  campaign_conversion_goal.campaign,
  campaign_conversion_goal.category,
  campaign_conversion_goal.origin,
  campaign_conversion_goal.biddable,
  campaign.id,
  campaign.name
FROM campaign_conversion_goal
WHERE campaign.advertising_channel_type = PERFORMANCE_MAX




Henceforth i would like to know if there is any process to be followed (Any Supportticket) , to enable GOAL on my account so that i get valid responses on my above queries .
Please correct if otherwise.  

Google Ads API Forum Advisor

unread,
Jan 27, 2022, 8:51:08 AM1/27/22
to amap.acce...@gmail.com, adwor...@googlegroups.com
Hi,

Let me raise this with my team. We will get back to you as soon as possible.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2Ujk53:ref

Google Ads API Forum Advisor

unread,
Jan 28, 2022, 4:22:19 PM1/28/22
to adwor...@googlegroups.com, amap.acce...@gmail.com
Hi,

I've requested that this customer 551-129-4223 be added to the necessary allowlist. We already have a job running to move all existing test accounts into the right groups, but it may take a couple of weeks to finish.

Meanwhile, is it possible to create a new test account? This feature works by default in new test accounts, so that might be a faster workaround while we wait for the existing account to be activated.

Cheers
Anash

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