Skip to content

أدوات Google Ads: Display و Performance Max و Demand Gen والفيديو ​

في هذه الصفحة 19 أداة. هذه الصفحة مولَّدة آليًا من قائمة الأدوات في الخادم نفسه، الإصدار 0.1.0، ولا تُحرَّر باليد. أوصاف الأدوات مكتوبة للمساعد الذكي، وهي بالإنجليزية ولم تُترجم، فكل ما تحت هذه الفقرة بالإنجليزية كما يقرؤه المساعد الذكي. لا تحتاج إلى معرفة اسم أي أداة لتطلب عملًا: هذه الصفحة مرجع لمن يريد أن يعرف ما تأخذه كل أداة بالضبط. صفحة كل الأدوات تسرد الصفحات كلها.

gads_list_asset_groups ​

Kind: read. It is marked as changing nothing.

The asset groups of a Performance Max campaign: each with its status, Google's ad strength and what Google says would improve it, its final URL, every asset linked to it (texts, images, videos, with the field type each is used as, whether it is serving, and whether the advertiser or Google made it) and its signals (audiences and search themes). The asset_id and field_type of an asset are what gads_update_asset_group removes it by. For how each asset group or asset performed, use gads_pmax_report.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
campaign_idtextyesA Performance Max campaign's id.

gads_search_brands ​

Kind: read. It is marked as changing nothing.

Find brands by the start of their name, as Google knows them, with the id a brand exclusion names (gads_set_brand_exclusions) and the brand's websites, to tell two brands of one name apart.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
texttextyesThe start of the brand's name, at least two characters.

gads_list_brand_lists ​

Kind: read. It is marked as changing nothing.

The account's brand lists, with how many brands each holds. With campaign_id: which of them that campaign excludes. With brand_list_id: that list's brands as well.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
campaign_idtextnononeOptional campaign, to say which lists it excludes.
brand_list_idtextnononeOptional single list to show with its brands.

gads_get_video_upload ​

Kind: read. It is marked as changing nothing.

The state of a video uploaded to YouTube with gads_upload_video, or of every upload the account has made through the API when no upload_id is given. States: PENDING (still uploading), UPLOADED (YouTube is processing it), PROCESSED (ready: its video_id can be made an asset with gads_create_youtube_video_asset), FAILED, REJECTED (validation or policy; Google's API gives no further reason) and UNAVAILABLE (removed from YouTube). Use it when gads_upload_video answered before processing had finished.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
upload_idtextnononeThe upload's id, from gads_upload_video. Left out: every upload, newest first.

gads_create_video_campaign ​

Kind: read. It is marked as changing nothing.

NOT AVAILABLE: this tool always refuses and changes nothing. Google does not let a Video campaign be created or changed through the Google Ads API. YouTube ads are made as a Demand Gen campaign instead: gads_create_demand_gen_campaign, gads_create_demand_gen_ad_group and gads_create_demand_gen_ad (kind=video), with gads_upload_video to put a video file on YouTube first. Call those; this one exists only so that asking for a Video campaign by name gets this answer.

ArgumentTypeRequiredDefaultDescription
customer_idtextnononeIgnored.
nametextnononeIgnored.

gads_create_display_campaign ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create a Display campaign with a budget of its own, its locations and its languages, in one transaction. Display shows image ads on websites, in apps and on YouTube to people who are NOT searching: who sees them is decided by the campaign's locations and languages and by what each ad group targets. The campaign is always created PAUSED. It shows nothing until it has an ad group (gads_create_display_ad_group) with an ad (gads_create_responsive_display_ad) and is enabled with gads_set_campaign_status.

Locations and languages are required: a campaign without them shows everywhere, to everyone.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
nametextyesCampaign name (must be unique in the account).
daily_budgetnumberyesDaily budget in account currency units.
biddingone of MAXIMIZE_CONVERSIONS, TARGET_CPA, MAXIMIZE_CLICKS, MANUAL_CPCyesMAXIMIZE_CONVERSIONS (optional target_cpa), TARGET_CPA (target_cpa required), MAXIMIZE_CLICKS (optional cpc_bid_ceiling) or MANUAL_CPC (the ad group's bid).
locationslist of textyesGeo target ids to show in (gads_search_geo_targets). At least one.
languageslist of textyesLanguage ids to target (gads_search_languages). At least one.
target_cpanumbernononeTarget cost per conversion, in account currency.
cpc_bid_ceilingnumbernononeThe most MAXIMIZE_CLICKS may bid for a click, in account currency.
start_datetextnononeOptional start, YYYY-MM-DD, in the account's time zone; not in the past.
end_datetextnononeOptional end, YYYY-MM-DD (the campaign runs through that day).
contains_eu_political_advertisingtrue or falsenofalsetrue only if the campaign carries political advertising aimed at the European Union; Google requires the declaration either way.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_create_display_ad_group ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create an ad group in a Display campaign together with what it targets, in one transaction. The ads show ONLY to what is listed here, within the campaign's locations and languages; each kind listed narrows the others (an audience AND a topic), and several of one kind widen it (this topic OR that one). Show the user the whole list before applying.

optimized_targeting is OFF unless the call says true. With it on, Google shows the ads to people and on places beyond this list, wherever it expects conversions: the list becomes a hint, not a boundary. Google's own default is on, so this writes it off by name, as a second logged step right after the ad group is made. Turn it on only when the user asked for it.

An ad group with nothing targeted and optimized targeting off would show to everyone in the campaign's locations, so it is refused. The ad group is created PAUSED unless the installation allows new ads to start enabled.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
campaign_idtextyesThe Display campaign to create it in.
nametextyesAd group name (unique in the campaign).
audienceslist of textnononeUser list ids to target (gads_list_audiences, kind user_lists).
interestslist of textnononeIn-market or affinity segment ids to target (gads_list_audiences).
placementslist of PlacementnononeWhere to show: {type, value} with type website, youtube_channel, youtube_video or app_category (ids from gads_search_content_categories).
topicslist of textnononeTopic ids to target (gads_search_content_categories).
keywordslist of textnononeDisplay keywords: pages about these words. Broad match only, as Display has it.
optimized_targetingtrue or falsenofalsetrue = let Google show the ads beyond what is listed (see above).
default_cpc_bidnumbernononeOptional max CPC bid in account currency, used under MANUAL_CPC.
statusone of ENABLED, PAUSEDnononePAUSED or ENABLED; leave out to follow the installation's setting.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_set_optimized_targeting ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Switch optimized targeting off or on for one ad group. Off: the ads show only to what the ad group targets. On: Google also shows them to people and on places beyond that, wherever it expects conversions, so reach and spend are no longer bounded by the targeting. Switch it on only when the user asked for exactly that; switching it off is never refused.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
ad_group_idtextyesThe ad group (gads_list_ad_groups).
enabledtrue or falseyesfalse = off, true = on.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_create_responsive_display_ad ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create a responsive display ad in a Display ad group: Google assembles it from these texts and images into whatever size a page or an app has room for. The images come from your media library by media_id and nowhere else (an image at a URL is added first with meta_add_media); each is measured here before anything is sent, and the image assets and the ad are made in one transaction. The ad is created PAUSED unless the installation allows new ads to start enabled. Google's asset enhancements and auto-generated video are not opted into. The dry run is Google's own check, policy included, so show the user what Google said.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
ad_group_idtextyesThe Display ad group (gads_list_ad_groups).
headlineslist of textyes1 to 5 short headlines, each up to 30 characters.
long_headlinetextyesOne long headline, up to 90 characters.
descriptionslist of textyes1 to 5 descriptions, each up to 90 characters.
business_nametextyesThe advertiser's name as shown, up to 25 characters.
marketing_imageslist of textyesLandscape images, 1.91:1 and at least 600x314: media ids. At least one.
square_imageslist of textyesSquare images, 1:1 and at least 300x300: media ids. At least one. With the landscape ones, 15 at most.
final_urltextyesThe landing page, a full http(s) address.
logoslist of textnononeOptional logos, square (at least 128x128) or 4:1 (at least 512x128): media ids, up to 5.
call_to_action_texttextnononeOptional button text, e.g. "Learn more"; Google keeps a list per language.
statusone of ENABLED, PAUSEDnononePAUSED or ENABLED; leave out to follow the installation's setting.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_create_pmax_campaign ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create a Performance Max campaign and its first asset group, in one transaction: a budget of its own, the campaign, its locations and languages, the business name and logos, the asset group with its texts, images and videos, and its signals. Google takes nothing less, so ask the user for ALL of it up front.

Tell the user what Performance Max is before applying: Google decides where the ads show (Search, YouTube, Display, Discover, Gmail, Maps), who sees them and how the texts and images are combined. This server can hold it to the daily budget, the target, the locations and the languages, and to nothing else. Signals are hints, not limits.

The campaign is always created PAUSED. Google's automations for it are all written off: its own headlines and descriptions, image cropping and retouching, images taken from the landing page, reworked videos, and final URL expansion. final_url_expansion=true lets Google send clicks to other pages of the site and write texts for them (Google ties its text customisation to it, so both go on); pass it only when the user asked for that.

contains_eu_political_advertising has no default: ask the user, do not assume.

Images come from the media library by media_id and nowhere else (an image at a URL is added first with meta_add_media); each is measured here before anything is sent.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
nametextyesCampaign name (must be unique in the account).
daily_budgetnumberyesDaily budget in account currency units. Its own budget, never a shared one.
biddingone of MAXIMIZE_CONVERSIONS, MAXIMIZE_CONVERSION_VALUEyesMAXIMIZE_CONVERSIONS (optional target_cpa) or MAXIMIZE_CONVERSION_VALUE (optional target_roas). Performance Max takes no other.
locationslist of textyesGeo target ids to show in (gads_search_geo_targets). At least one.
languageslist of textyesLanguage ids to target (gads_search_languages). At least one.
final_urltextyesThe landing page, a full http(s) address.
business_nametextyesThe advertiser's name as shown, up to 25 characters.
headlineslist of textyes3 to 15 headlines, each up to 30 characters.
long_headlineslist of textyes1 to 5 long headlines, each up to 90 characters.
descriptionslist of textyes2 to 5 descriptions, each up to 90 characters; one of them 60 or fewer.
marketing_imageslist of textyesLandscape images, 1.91:1 and at least 600x314: media ids. 1 to 20.
square_imageslist of textyesSquare images, 1:1 and at least 300x300: media ids. 1 to 20.
logoslist of textyesLogos: media ids, 1 to 5. At least one square (1:1, at least 128x128); the others square or wide (4:1, at least 512x128).
contains_eu_political_advertisingtrue or falseyestrue only if the campaign carries political advertising aimed at the European Union. Required: the user states it.
target_cpanumbernononeTarget cost per conversion, in account currency (MAXIMIZE_CONVERSIONS).
target_roasnumbernononeTarget return on ad spend as a ratio: 4.0 means 400% (MAXIMIZE_CONVERSION_VALUE).
portrait_imageslist of textnononeOptional portrait images, 4:5 and at least 480x600: media ids, up to 20.
videoslist of textnononeOptional YouTube videos, by id or address, up to 15. Without one Google may make a video from the images and texts.
audience_signaltextnononeOptional id of a saved audience (gads_list_audiences, kind=saved): a hint about who is likely to convert.
search_themeslist of textnononeOptional search themes, up to 50: what people who want this search for.
final_url_expansiontrue or falsenofalsetrue = let Google send clicks beyond final_url (see above).
asset_group_nametextnononeOptional name for the asset group.
asset_group_statusone of ENABLED, PAUSEDnononePAUSED or ENABLED; leave out to follow the installation's setting.
start_datetextnononeOptional start, YYYY-MM-DD, in the account's time zone; not in the past.
end_datetextnononeOptional end, YYYY-MM-DD (the campaign runs through that day).
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_create_asset_group ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Add a further asset group to a Performance Max campaign, with its texts, images, videos and signals, in one transaction: Google takes an asset group only with its minimum assets. Use one asset group per theme or landing page; all of a campaign's asset groups share its budget, bidding, locations and languages.

It is created PAUSED unless the installation lets new ads start, and enabled with gads_update_asset_group. An ENABLED asset group in an ENABLED campaign starts showing.

The business name and the logos are the campaign's own where it has brand guidelines on (every campaign made by gads_create_pmax_campaign): leave business_name and logos out. Only a campaign with brand guidelines off needs them here; gads_list_asset_groups says which.

Images come from the media library by media_id and nowhere else; each is measured first.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
campaign_idtextyesThe Performance Max campaign's id.
nametextyesAsset group name (unique in the campaign).
final_urltextyesThe landing page, a full http(s) address.
headlineslist of textyes3 to 15 headlines, each up to 30 characters.
long_headlineslist of textyes1 to 5 long headlines, each up to 90 characters.
descriptionslist of textyes2 to 5 descriptions, each up to 90 characters; one of them 60 or fewer.
marketing_imageslist of textyesLandscape images, 1.91:1 and at least 600x314: media ids. 1 to 20.
square_imageslist of textyesSquare images, 1:1 and at least 300x300: media ids. 1 to 20.
portrait_imageslist of textnononeOptional portrait images, 4:5 and at least 480x600: media ids, up to 20.
videoslist of textnononeOptional YouTube videos, by id or address, up to 15.
audience_signaltextnononeOptional id of a saved audience (gads_list_audiences, kind=saved): a hint.
search_themeslist of textnononeOptional search themes, up to 50: what people who want this search for.
business_nametextnononeOnly for a campaign with brand guidelines off: the advertiser's name, up to 25.
logoslist of textnononeOnly for a campaign with brand guidelines off: 1 to 5 logo media ids, one square.
statusone of ENABLED, PAUSEDnononePAUSED or ENABLED; leave out to follow the installation's setting.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_update_asset_group ​

Kind: write. It only previews the change unless dry_run is false. Removing needs confirm_remove to be true as well. Not offered while the server is in read-only mode.

Change a Performance Max asset group: rename it, change its final URL, pause or enable it, add assets, and unlink assets. (An asset group is not removed from here; pausing is its off switch.) status=ENABLED is how an asset group created PAUSED is started: in an ENABLED campaign it then shows and spends, so do it only when the user asked.

To REPLACE an asset, give the new one in add_assets and the old one in remove_asset_ids in the same call: both happen in one transaction, so the asset group never has fewer than Google requires. A removal that would leave it under a minimum (3 headlines, 1 long headline, 2 descriptions with one of 60 characters or fewer, 1 landscape image, 1 square image) is refused. Unlinking needs confirm_remove=true; the asset itself stays in the account.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
asset_group_idtextyesAsset group id from gads_list_asset_groups.
nametextnononeA new name.
final_urltextnononeA new landing page, a full http(s) address; it replaces the asset group's final URLs.
statusone of ENABLED, PAUSEDnononeENABLED or PAUSED.
add_assetsAssetsToAddnononeWhat to add: headlines, long_headlines, descriptions, marketing_images, square_images, portrait_images (media ids) and videos (YouTube ids or addresses).
remove_asset_idslist of textnononeAsset ids to unlink, from gads_list_asset_groups; "<asset_id>~<FIELD_TYPE>" where one asset is linked under two field types.
confirm_removetrue or falsenofalseMust be true to unlink, after the user asked for the removal.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_set_asset_group_signals ​

Kind: write. It only previews the change unless dry_run is false. Removing needs confirm_remove to be true as well. Not offered while the server is in read-only mode.

Set a Performance Max asset group's signals: its audience signal and its search themes. Signals are HINTS to Google about who is likely to convert. They never limit who sees the ads: do not present them as targeting.

audience_id names the saved audience the asset group should have (gads_list_audiences with kind=saved); one it has already is replaced. search_themes is the WHOLE list it should have: themes not on it yet are added and themes it has that are not in the list are removed. Leave an argument out to leave that kind of signal as it is. Anything that removes a signal needs confirm_remove=true. All of it is one transaction.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
asset_group_idtextyesAsset group id from gads_list_asset_groups.
audience_idtextnononeThe saved audience to use as the audience signal.
remove_audiencetrue or falsenofalsetrue = take the audience signal off, leaving none.
search_themeslist of textnononeThe complete list of search themes, up to 50, each up to 80 characters and ten words. An empty list removes them all.
confirm_removetrue or falsenofalseMust be true when a signal is removed or replaced, after the user asked.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_set_brand_exclusions ​

Kind: write. It only previews the change unless dry_run is false. Removing needs confirm_remove to be true as well. Not offered while the server is in read-only mode.

Keep a Performance Max campaign off searches for certain brands (its own brand, so that it does not take what a Search campaign already catches, or competitors'). Brands are excluded as a brand list: give brand_list_id to exclude a list the account has (gads_list_brand_lists), or brands - brand ids from gads_search_brands - to make a new list and exclude it, in one transaction. It holds for this campaign only.

remove_brand_list_ids lifts an exclusion, so the campaign can show on those searches again: it needs confirm_remove=true, and the brand list itself is kept. A brand list is not edited from here: to change which brands are excluded, make a new list and lift the old one in the same call.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
campaign_idtextyesThe Performance Max campaign's id.
brand_list_idtextnononeAn existing brand list to exclude.
brandslist of textnononeBrand ids (gads_search_brands) for a new brand list, up to 100.
list_nametextnononeName for the new list; "<campaign name> brand exclusions" by default.
remove_brand_list_idslist of textnononeBrand lists the campaign should stop excluding.
confirm_removetrue or falsenofalseMust be true to lift an exclusion, after the user asked for exactly that.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_create_youtube_video_asset ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Make a video that is already on YouTube an asset of the account, so it can be used in a Performance Max asset group (gads_update_asset_group) or a video ad. Give the video's 11-character id or its YouTube address; only the id's form is checked here and nothing is fetched. Whether the video exists and may be used (not private, not age-restricted) is Google's to say, and its dry run does say it. A video the account already holds as an asset is handed back, not made twice. A video file that is not on YouTube yet is uploaded first with gads_upload_video.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
youtube_videotextyesThe video's id (11 characters) or its youtube.com / youtu.be address.
nametextnononeOptional name for the asset in Google Ads.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_upload_video ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Upload a video file from your media library to YouTube through Google Ads, and make it a video asset of the account. THE VIDEO IS THEN ON YOUTUBE, outside this server, for good: nothing here can take it back, and anyone who has its link can watch it.

Where it lands: without channel_id, on a YouTube channel that Google manages for this Google Ads account (not the advertiser's own channel, and not visible in their YouTube Studio). With channel_id, on that channel, which must be the advertiser's own and linked to the Google Ads account. Either way it is uploaded UNLISTED: it does not appear in search or on the channel, and is seen in ads and by whoever has the link. This tool never uploads a public video; on the advertiser's own channel a person can make it public afterwards in YouTube Studio.

The file comes from the media library by media_id and nowhere else (a video at a URL is added first with meta_add_media; the library is shared by every platform). An upload cannot be checked without sending the file, so the dry run is this server's own preflight (status preflighted_not_sent): it sends nothing, and Google has not seen or accepted anything. Ask the user before dry_run=false, and tell them where the video will be. After the upload the tool waits up to three minutes for YouTube to process the video and then makes the asset; if processing takes longer it answers with the upload's id, and gads_get_video_upload reads its state later.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
media_idtextyesThe video (MP4 or MOV) in your media library (meta_list_media lists them).
titletextyesThe video's title on YouTube, up to 100 characters. It cannot be changed from here.
descriptiontextyesThe video's description on YouTube, up to 5000 characters.
channel_idtextnononeOptional: the advertiser's own YouTube channel id (starts with UC, 24 characters). Left out: a channel Google manages for the account.
dry_runtrue or falsenotruetrue = preflight only, nothing sent (default). false = upload, only after the user confirms.

gads_create_demand_gen_campaign ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create a Demand Gen campaign with a budget of its own, in one transaction. Demand Gen shows image and video ads on YouTube (in-stream, in-feed, Shorts), Discover, Gmail, Maps and the Display network to people who are NOT searching. It is how a YouTube ad is made from here: Google does not allow a Video campaign to be created through its API.

The campaign is always created PAUSED and holds nothing yet. Where it shows, in which locations and languages and to whom is set on each ad group (gads_create_demand_gen_ad_group), and the ads with gads_create_demand_gen_ad; then it is enabled with gads_set_campaign_status.

Give daily_budget, or total_budget with start_date and end_date (the whole amount spent over those days). Google refuses a budget under 5 US dollars a day, or its equivalent.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
nametextyesCampaign name (must be unique in the account).
biddingone of MAXIMIZE_CONVERSIONS, TARGET_CPA, MAXIMIZE_CLICKS, TARGET_ROASyesMAXIMIZE_CONVERSIONS (optional target_cpa), TARGET_CPA (target_cpa required), MAXIMIZE_CLICKS or TARGET_ROAS (target_roas required).
contains_eu_political_advertisingtrue or falseyesAsk the user; there is no default. true only if the campaign carries political advertising aimed at the European Union.
daily_budgetnumbernononeAverage daily budget in account currency units.
total_budgetnumbernononeInstead of daily_budget: the whole budget for the campaign's run, in account currency units. Needs start_date and end_date.
start_datetextnononeStart, YYYY-MM-DD, in the account's time zone; not in the past.
end_datetextnononeEnd, YYYY-MM-DD (the campaign runs through that day).
target_cpanumbernononeTarget cost per conversion, in account currency.
target_roasnumbernononeTarget return on ad spend as a ratio: 4.0 is 400%.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_create_demand_gen_ad_group ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create an ad group in a Demand Gen campaign with its locations, its languages, its channels and (optionally) its audience, in one transaction. A Demand Gen campaign keeps locations and languages on the ad group, so both are required here: without them the ads would show everywhere, to everyone. Show the user the channels and the audience before applying.

channels says where the ads may show: youtube_in_stream, youtube_in_feed, youtube_shorts, discover, gmail, display (other companies' websites and apps) and maps. Left out, all of them are on, as Google has it. For YouTube ads only, give the three youtube_ ones.

optimized_targeting is OFF unless the call says true. With it on, Google shows the ads to people beyond the audience, wherever it expects conversions. Google's own default is on, so this writes it off by name, as a second logged step right after the ad group is made. Turn it on only when the user asked for it.

The ad group is created PAUSED unless the installation allows new ads to start enabled.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
campaign_idtextyesThe Demand Gen campaign to create it in.
nametextyesAd group name (unique in the campaign).
locationslist of textyesGeo target ids to show in (gads_search_geo_targets). At least one.
languageslist of textyesLanguage ids to target (gads_search_languages). At least one.
audience_idtextnononeOptional saved audience to show the ads to (gads_list_audiences, kind=saved). Left out, the ads show to everyone in the locations who uses the languages.
channelslist of one of youtube_in_stream, youtube_in_feed, youtube_shorts, discover, gmail, display, mapsnononeWhere the ads may show (see above). Left out = every channel.
optimized_targetingtrue or falsenofalsetrue = let Google show the ads beyond the audience (see above).
statusone of ENABLED, PAUSEDnononePAUSED or ENABLED; leave out to follow the installation's setting.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

gads_create_demand_gen_ad ​

Kind: write. It only previews the change unless dry_run is false. Not offered while the server is in read-only mode.

Create an ad in a Demand Gen ad group. kind decides what it is made of:

  • image: 1 to 5 headlines (30 characters), 1 to 5 descriptions (90), 1 to 5 logos, and images: at least one landscape or square one, 20 at most with the portrait ones.
  • carousel: exactly one headline (40) and one description (90), exactly one logo, and 2 to 10 cards, each with its own image, headline and (optionally) landing page.
  • video: 1 to 5 videos, 1 to 5 headlines (40), 1 to 5 long_headlines (90), 1 to 5 descriptions (90) and a logo. This is the YouTube ad.

Images and logos come from your media library by media_id and nowhere else (an image at a URL is added first with meta_add_media); each is measured here before anything is sent. A video is a YouTube video's id or address; a video file is put on YouTube first with gads_upload_video, as its own confirmed step. The assets and the ad are made in one transaction. The ad is created PAUSED unless the installation allows new ads to start enabled. Every automation Google has for the ad's kind (redesigned images, videos made from images, shorter and vertical versions of a video, landing page previews) is written opted out. The dry run is Google's own check, policy included, so show the user what Google said.

ArgumentTypeRequiredDefaultDescription
customer_idtextyes10-digit Google Ads account id.
ad_group_idtextyesThe Demand Gen ad group (gads_list_ad_groups).
kindone of image, carousel, videoyesimage, carousel or video.
final_urltextyesThe landing page, a full http(s) address.
business_nametextyesThe advertiser's name as shown, up to 25 characters.
headlineslist of textyesThe headlines (see above for how many and how wide).
descriptionslist of textyesThe descriptions.
logoslist of textyesSquare logos, 1:1 and at least 128x128: media ids.
long_headlineslist of textnononevideo only: 1 to 5 long headlines, each up to 90 characters.
marketing_imageslist of textnononeimage only: landscape images, 1.91:1 and at least 600x314: media ids.
square_imageslist of textnononeimage only: square images, 1:1 and at least 300x300: media ids.
portrait_imageslist of textnononeimage only: portrait images, 4:5 and at least 480x600: media ids.
tall_portrait_imageslist of textnononeimage only: tall images, 9:16 and at least 600x1067: media ids.
videoslist of textnononevideo only: YouTube video ids or addresses.
cardslist of Cardnononecarousel only: {headline, marketing_image and/or square_image, portrait_image?, final_url?, call_to_action_text?}, 2 to 10 of them, the images as media ids.
call_to_action_texttextnononeimage and carousel: optional button text, e.g. "Learn more".
statusone of ENABLED, PAUSEDnononePAUSED or ENABLED; leave out to follow the installation's setting.
dry_runtrue or falsenotruetrue = validate only (default). false = apply, only after the user confirms.

Objects the arguments take ​

An argument whose type is a name takes an object with these fields.

Placement ​

One place to keep ads off.

FieldTypeRequiredDefaultDescription
typeone of website, youtube_channel, youtube_video, app_categoryyes
valuetext (1 to 2048 characters)yeswebsite: a host or a page address without a query, e.g. example.com or example.com/games. youtube_channel: the channel id (UC...) or its youtube.com/channel/ address. youtube_video: the 11-character video id or the video's address. app_category: a category id from gads_search_content_categories.

AssetsToAdd ​

What gads_update_asset_group adds to an asset group.

FieldTypeRequiredDefaultDescription
headlineslist of textnoHeadlines to add, each up to 30 characters.
long_headlineslist of textnoLong headlines to add, each up to 90 characters.
descriptionslist of textnoDescriptions to add, each up to 90 characters.
marketing_imageslist of textnoLandscape images to add (1.91:1, at least 600x314): media ids from the library.
square_imageslist of textnoSquare images to add (1:1, at least 300x300): media ids.
portrait_imageslist of textnoPortrait images to add (4:5, at least 480x600): media ids.
videoslist of textnoYouTube videos to add, by id or address.
business_nametextnononeA new business name, up to 25 characters. Only where the campaign has brand guidelines off; remove the old one in the same call.
logoslist of textnoLogos to add: media ids, square (1:1, at least 128x128) or wide (4:1). Only where the campaign has brand guidelines off.

Card ​

One card of a carousel ad: an image, a headline and where a click on it leads.

FieldTypeRequiredDefaultDescription
headlinetextyesThe card's headline, up to 40 characters.
marketing_imagetextnononeLandscape image, 1.91:1, at least 600x314: a media id.
square_imagetextnononeSquare image, 1:1, at least 300x300: a media id.
portrait_imagetextnononeOptional portrait image, 4:5, at least 480x600: a media id.
final_urltextnononeWhere this card leads; the ad's final_url when left out.
call_to_action_texttextnononeOptional button text for this card.