Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Creating a Demand Gen Campaign with YouTube Engagement Goal – Support for v18?

165 views
Skip to first unread message

Trisha Sharma

unread,
Apr 24, 2025, 12:25:59 PMApr 24
to Google Ads API and AdWords API Forum

Hi everyone,

I’m looking to create a Demand Gen campaign with the primary goal of YouTube engagement (e.g., views, interactions).

I have a few questions regarding this:

  1. Is this campaign goal supported in API version 18?

  2. If yes, could you please provide the relevant resource names/endpoints and the required parameters for creating this campaign via the Google Ads API?

  3. Additionally, if possible, could you share a sample code snippet showing how to set up:

    • The campaign itself

    • An ad group

    • And a YouTube ad (asset/ad creative)

I apologize if this has been asked before — I’ve looked through the documentation, but haven’t been able to find a clear example specifically for this use case.

Any help or references would be greatly appreciated. Thanks in advance!

Google Ads API Forum Advisor

unread,
Apr 24, 2025, 4:28:55 PMApr 24
to trisha0...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team. 

Please find the answers for your questions below:

1. Is this campaign goal supported in API version 18?

  • Yes, campaign goals are supported for the Google Ads API version 18. Campaign goals allow you to optimize individual campaigns for specific conversion actions. If certain campaigns have goals that differ from your overall account-level objectives, you can adjust each 'CampaignConversionGoal' accordingly by modifying its 'biddable' setting. For instance, if your account typically focuses on eCommerce conversions but you have one campaign aimed at driving store visits, you can set 'biddable=true' for all 'CampaignConversionGoal' objects with the category 'STORE_VISIT', and set 'biddable=false' for all others. I would recommend you to refer to the Campaign goals documentation for more detailed information. 

2. If yes, could you please provide the relevant resource names/endpoints and the required parameters for creating this campaign via the Google Ads API?

  • You can use this campaigns.mutate endpoint for creating campaigns using the API. I would recommend you to refer to this guide to find the required and optional fields while creating campaigns using the Google Ads API. 

3. Additionally, if possible, could you share a sample code snippet showing how to set up: The campaign itself, An ad group, And a YouTube ad (asset/ad creative)

  • There are no specific code snippets on how to create a demand gen campaign, ad group and ad. However, I am sharing with you the sample request and response logs for each of these for your reference. 
  • I would recommend you to refer to the Create a Demand Gen Campaign documentation for more detailed information. 
For creating a campaign first you need to create a campaign budget using the campaignBudgets method in the Google Ads API: 
Request Body:
==============
POST https://googleads.googleapis.com/v19/customers/{customerId}/campaignBudgets:mutate?key=[YOUR_API_KEY] HTTP/1.1

developer-token: **********************
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json

{
  "operations": [
    {
      "create": {
        "amountMicros": 100000,
        "deliveryMethod": "STANDARD",
        "name": "campaign budget1289",
        "type": "STANDARD"
      }
    }
  ]
}

Response:
===========
HTTP/1.1 200 
content-encoding: gzip
content-length: 114
content-type: application/json; charset=UTF-8
date: Thu, 24 Apr 2025 20:00:45 GMT
server: ESF
vary: Origin, X-Origin, Referer

{
  "results": [
    {
      "resourceName": "customers/{customerId}/campaignBudgets/{campaignBudgetId}"
    }
  ]
}
Then you need to create a campaign using the campaigns method: 
Request Body:
==============
POST https://googleads.googleapis.com/v19/customers/{customerId}/campaigns:mutate?key=[YOUR_API_KEY] HTTP/1.1

developer-token: **********************
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json

{
  "operations": [
    {
      "create": {
        "name": "demand gen campaign233",
        "advertisingChannelType": "DEMAND_GEN",
        "campaignBudget": "customers/{customerId}/campaignBudgets/{campaignBudgetId}",
        "targetCpa": {
          "targetCpaMicros": 10000
        }
      }
    }
  ]
}
Response:
==========
HTTP/1.1 200 
content-encoding: gzip
content-length: 108
content-type: application/json; charset=UTF-8
date: Thu, 24 Apr 2025 20:04:49 GMT
server: ESF
vary: Origin, X-Origin, Referer

{
  "results": [
    {
      "resourceName": "customers/{customerId}/campaigns/{campaignId}"
    }
  ]
}
Then you need to create an ad group using the adGroups method:
Request Body:
===============
POST https://googleads.googleapis.com/v19/customers/{customerId}/adGroups:mutate?key=[YOUR_API_KEY] HTTP/1.1

developer-token: **********************
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json

{
  "operations": [
    {
      "create": {
        "campaign": "customers/{customerId}/campaigns/{campaignId}",
        "name": "demand gen ad group 20",
        "status": "ENABLED"
      }
    }
  ]
}
Response:
==========
HTTP/1.1 200 
content-encoding: gzip
content-length: 106
content-type: application/json; charset=UTF-8
date: Thu, 24 Apr 2025 20:06:05 GMT
server: ESF
vary: Origin, X-Origin, Referer

{
  "results": [
    {
      "resourceName": "customers/{customerId}/adGroups/{adGroupId}"
    }
  ]
}
As you are specifically looking for the YouTube videos related ad, you need to create a DemandGenVideoResponsiveAdInfo and add the YouTube based video asset IDs to the 'videos' field. I would recommend you to kindly refer to the adGroupAds.mutate method where you can create ads using the Google Ads API. 
Request Body:
===============
POST https://googleads.googleapis.com/v19/customers/{customerId}/adGroupAds:mutate?key=[YOUR_API_KEY] HTTP/1.1

developer-token: **********************
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json

{
  "operations": [
    {
      "create": {
        "adGroup": "customers/{customerId}/adGroups/{adGroupId}",
        "status": "ENABLED",
        "ad": {
          "demandGenVideoResponsiveAd": {
            "headlines": [
              {
                "text": "demand gen video ad"
              }
            ],
            "descriptions": [
              {
                "text": "a good demand gen video responsive ad"
              }
            ],
            "longHeadlines": [
              {
                "text": "a long headline for the demand gen video responsive ad"
              }
            ],
            "videos": [
              {
                "asset": "customers/{customerId}/assets/{assetId}"
              }
            ],
            "logoImages": [
              {
                "asset": "customers/{customerId}/assets/{assetId}"
              }
            ],
            "breadcrumb1": "demand gen",
            "breadcrumb2": "video",
            "businessName": {
              "text": "Video Ads business"
            },
            "callToActions": [
              {
                "asset": "customers/{customerId}/assets/{assetId}"
              }
            ]
          },
          "name": "Demand gen video responsive",
          "finalUrls": [
            "https://www.example.com"
          ]
        }
      }
    }
  ]
}
Response:
============
HTTP/1.1 200 
content-encoding: gzip
content-length: 121
content-type: application/json; charset=UTF-8
date: Thu, 24 Apr 2025 20:07:58 GMT
server: ESF
vary: Origin, X-Origin, Referer

{
  "results": [
    {
      "resourceName": "customers/{customerId}/adGroupAds/{adGroupId}~{adId}"
    }
  ]
}
I hope this clarifies. 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-04-24 20:28:02Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)



charlesb...@gmail.com

unread,
Apr 24, 2025, 4:36:16 PMApr 24
to Google Ads API and AdWords API Forum
Hi!

With their first question they're asking specifically about the YouTube Engagements campaign goal (and I'd like to know the same thing please!).

Is the YouTube Engagements campaign goal specifically supported?

Thanks

Google Ads API Forum Advisor

unread,
Apr 24, 2025, 11:18:42 PMApr 24
to charlesb...@gmail.com, adwor...@googlegroups.com
Hi,

Could you share the uncropped screenshot of the Google Ads UI by highlighting the YouTube Engagements campaign goal you are referring to for demand Gen campaigns? 

You can send the details via Reply privately to the author option, or direct private reply to this email. 

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-25 03:17:28Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)



charlesb...@gmail.com

unread,
Apr 25, 2025, 9:30:33 AMApr 25
to Google Ads API and AdWords API Forum
Hi,

Of course, here it is:

demandgenyoutubeengagements.png

Thanks,

Charles

charlesb...@gmail.com

unread,
Apr 25, 2025, 11:35:51 AMApr 25
to Google Ads API and AdWords API Forum
Hi,

I should add: it would be good to know if this is supported more broadly (v19.1), not just for v18 per the original post.

(And whether/when it will be supported if it isn't already)

Thanks again for your help!

Google Ads API Forum Advisor

unread,
Apr 25, 2025, 3:05:42 PMApr 25
to charlesb...@gmail.com, adwor...@googlegroups.com
Hi,

Yes, the YouTube Engagements campaign goal is specifically supported through both the Google Ads UI and the Google Ads API (v19). For more detailed information, I would recommend you to refer to the help center article "About YouTube Engagements goals in Demand Gen." 

To set this up via the Google Ads API, you’ll need to use the appropriate endpoint to create 'CampaignConversionGoals' for your Demand Gen campaign. Make sure to set the 'ConversionActionCategory' to 'ENGAGEMENT' and the 'ConversionOrigin' to 'YOUTUBE_HOSTED'.

After reviewing your account (125-518-7903), I can confirm that 'ENGAGEMENT' is already selected as the account default goal. Since it's an account default goal, you’ll also need to set the 'biddable' field to 'true'. However, if you don’t define any specific conversion goals for your campaign, the account-level goals will be applied by default. In your case, since the account-level goal is set to 'ENGAGEMENT' with the conversion source as 'YouTube Hosted', all your campaigns will use this configuration unless you choose to override it.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-25 19:04:49Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)



charlesb...@gmail.com

unread,
Apr 25, 2025, 5:53:25 PMApr 25
to Google Ads API and AdWords API Forum
Hi,

That's a great response, thank you.

Here's the operation that worked for me, for future reference:

{
  "operations": [
    {
      "update": {
        "category": "ENGAGEMENT",
        "biddable": true,
        "origin": "YOUTUBE_HOSTED",
        "resourceName": "customers/{customer_id}/campaignConversionGoals/{campaign_id}~ENGAGEMENT~YOUTUBE_HOSTED"
      },
      "updateMask": "category,biddable,origin,resource_name"
    }
  ]
}

Thanks again,

Charles

Ashish Chaturvedi (Ashu)

unread,
Apr 26, 2025, 12:19:13 PMApr 26
to Google Ads API and AdWords API Forum
Hi,

Thanks for the great response — it’s really working well!

Meanwhile, I have a question: In the above code, I created a Demand Gen campaign and changed the campaign goal to YouTube Engagement. However, I noticed that a Target Cost Per Action (tCPA) of 0.01 was automatically set, which I don't want.

Screenshot 2025-04-26 at 9.44.24 PM.png

How can I remove or uncheck this setting using the Google Ads API (v19)?


Thanks,
Ashish

Google Ads API Forum Advisor

unread,
Apr 27, 2025, 10:13:14 PMApr 27
to ashish007...@gmail.com, adwor...@googlegroups.com

Hi,

With regard to the Google Ads UI screenshot that you have provided, we are not sure why the target CPA value is getting automatically applied as our team only provides support for Google Ads API related concerns and technical implementations. But, if you use Google Ads API, then you need to explicitly mention the target CPA value. If you do not specify it, it will not be applied to your campaign.

I hope this clarifies your concern. Feel free to reach out for any further concerns/ queries.

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-28 02:12:21Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)



Ashish Chaturvedi (Ashu)

unread,
Apr 28, 2025, 6:50:12 AMApr 28
to Google Ads API and AdWords API Forum
Hello :)

Let me clarify my question:

I need to create a Demand Gen campaign with the campaign goal set to YouTube engagements, but without specifying a target cost per action — meaning no bidding constraint.

Screenshot 2025-04-28 at 4.11.05 PM.png

Here is my actual POST request
```
POST https://googleads.googleapis.com/v19/customers/{customer_id}/campaigns:mutate?access_token={access_token}&key=[YOUR_API_KEY] HTTP/1.1


developer-token: **********************
Authorization: Bearer [YOUR_ACCESS_TOKEN]
Accept: application/json
Content-Type: application/json

{
  "operations": [
    {
      "create": {
        "name": "demand gen campaign233",
        "advertisingChannelType": "DEMAND_GEN",
        "campaignBudget": "customers/{customer_id}/campaignBudgets/{budget_id}"
      }
    }
  ]
}
```
and my response in 
```
{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.ads.googleads.v19.errors.GoogleAdsFailure",
        "errors": [
          {
            "errorCode": {
              "fieldError": "REQUIRED"
            },
            "message": "The required field was not present.",
            "location": {
              "fieldPathElements": [
                {
                  "fieldName": "operations",
                  "index": 0
                },
                {
                  "fieldName": "create"
                },
                {
                  "fieldName": "campaign_bidding_strategy"
                }
              ]
            }
          }
        ],
        "requestId": "gg5fXZbHSTpE-npu1pK1eQ"
      }
    ]
  }
}
```

In the campaign creation request, the campaign is created successfully when this value is included.

"targetCpa": { "targetCpaMicros": 10000 }

However, when we do not include it, I consistently receive the error: campaign_bidding_strategy (The required field was not present.)

I am not sure how to create a campaign without including targetCpa. This campaign is intended only for a Demand Gen campaign

Thanks,
Ashish

Google Ads API Forum Advisor

unread,
Apr 28, 2025, 11:48:20 AMApr 28
to ashish007...@gmail.com, adwor...@googlegroups.com
Hi Ashish,

Based on the provided information, it appears that you’ve encountered the 'The required field was not present’ error while attempting to create a demand gen campaign via the Google Ads API. It is required to include the bidding strategy field while creating the demand gen campaign via the API. I would like to inform you that to create a demand gen campaign, you have to follow the given steps:
  1. Create a budget.
  2. Create a Demand Gen campaign with appropriate bidding strategies.
  3. Create an ad group without a type.
  4. Create audiences.
  5. Create assets and Demand Gen ads.
Please note that after the budget is created, you can create a campaign. Demand Gen campaigns have an AdvertisingChannelType of DEMAND_GEN. No AdvertisingChannelSubType should be set. Set up conversion goals for your campaign. Supported bidding strategies are maximize clicks, target CPA, maximize conversions, and target ROAS. Kindly refer to create a demand gen campaign for more information. Reporting information for demand gen campaigns can be retrieved at different levels, similar to other campaign types, refer to the Report and optimize. We tried to create the demand gen from my end and we were able to create the campaign successfully without any errors. Kindly refer to the sample request and response bodies below for reference:
{
  "operations": [
    {
      "create": {
        "name": "demand gen campaign233",
        "advertisingChannelType": "DEMAND_GEN",
        "status": "ENABLED",
        "campaignBudget": "customers/{customerId}/campaignBudgets/{campaign_budget_id}",
        "targetCpa": {
          "targetCpaMicros": 10000
        }
      }
    }
  ]
}


{
  "results": [
    {
      "resourceName": "customers/{customerId}/campaigns/{campaignId}"
    }
  ]
}
I request you kindly create the demand gen campaign by following the given suggestions via the Google Ads API and let us know how if you still face any issues.

 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-28 15:47:32Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)



Ashish Chaturvedi (Ashu)

unread,
Apr 28, 2025, 12:09:47 PMApr 28
to Google Ads API and AdWords API Forum
Hello :)

Issue is when we use your code 

{ "operations": [ { "create": { "name": "demand gen campaign233", "advertisingChannelType": "DEMAND_GEN", "status": "ENABLED", "campaignBudget": "customers/{customerId}/campaignBudgets/{campaign_budget_id}", "targetCpa": { "targetCpaMicros": 10000 } } } ] } { "results": [ { "resourceName": "customers/{customerId}/campaigns/{campaignId}" } ] } 
We find Target Cost Per Action option in the campaign which I dont need. I need to create campaign without Target Cost Per Action.

How I can do this ??

Thanks

Google Ads API Forum Advisor

unread,
Apr 28, 2025, 3:38:32 PMApr 28
to ashish007...@gmail.com, adwor...@googlegroups.com

Hi,

Please note that you need to create a Demand Gen campaign with appropriate bidding strategies. Without a bussing strategy, it is not possible to create the demand gen campaign. So the supported bidding strategies are maximize clicks, target CPA, maximize conversions, and target ROAS. For more information, please refer to the Supported bidding strategies help center article.

Thanks,

 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-04-28 19:37:44Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUt5q:ref" (ADR-00301597)



Reply all
Reply to author
Forward
0 new messages