How to create a ad group with the type is shopping - showcase?

77 views
Skip to first unread message

Nguyen Mark

unread,
Oct 20, 2020, 12:39:24 PM10/20/20
to AdWords API and Google Ads API Forum
Hi there

I am doing with google ads API, on the UI easily to create a campaign with ad group type is `shopping - showcase` like my capture below


but via google ads API I can find out the way to set ad group type, here is my code:

// Creates an ad group.
$adGroup = new AdGroup([
'name' => $campaign->name,
'campaign' => $campaignResourceName,
'type' => AdGroupType::[i can find the SHOPPING_SHOWCASE_ADS enum],
'status' => AdGroupStatus::ENABLED
]);

Plz give me some advises.

Nguyen Mark

unread,
Oct 20, 2020, 2:37:55 PM10/20/20
to AdWords API and Google Ads API Forum
Noted. i am using the google ads php 

ads.PNG

Vào lúc 23:39:24 UTC+7 ngày Thứ Ba, 20 tháng 10, 2020, Nguyen Mark đã viết:

Google Ads API Forum Advisor Prod

unread,
Oct 20, 2020, 11:11:31 PM10/20/20
to maker...@gmail.com, adwor...@googlegroups.com
Hi,

Thanks for posting your concern.

On the Google Ads API perspective, shopping showcase ads will not be available here as discussed on this guide. With this, creation of shopping showcase ad group and campaign will not be possible also on Google Ads API.

Let me know if you have further questions.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q26Akuy:ref

Nguyen Mark

unread,
Oct 21, 2020, 10:36:35 AM10/21/20
to AdWords API and Google Ads API Forum
Thank you for responding, 
From the example code to create a ad belong to group id existed so how to create a `ad group ad` with the type which compatible with the it.

Here is my logic code

$gaCampaign = new Campaign([
            'name' => $campaignData->name,
             'advertising_channel_type' => AdvertisingChannelType::SHOPPING,
             'status' => CampaignStatus::ENABLED,
             "start_date" => $campaignData->from_date_ymd,
             "end_date" => $campaignData->to_date_ymd,
             'campaign_budget' => $budgetResourceName
]);


$adGroup = new AdGroup([
             'name' => $campaign->name,
             'campaign' => $campaignResourceName,
             'type' => AdGroupType::SHOPPING_PRODUCT_ADS,

             'status' => AdGroupStatus::ENABLED
]);

$ad = new Ad([
             "name" => "Ad - " . $campaign->name,
]);
$ad->setType(AdType::EXPANDED_TEXT_AD);
             $expandedTextAdInfo = new ExpandedTextAdInfo([
             'headline_part1' => $campaign->headline_part1,
             'description' => $campaign->description,
]);
if ($campaign->headline_part2 != null && $campaign->headline_part2 != "") {
             $expandedTextAdInfo->setHeadlinePart2($campaign->headline_part2);
}
if ($campaign->headline_part3 != null && $campaign->headline_part3 != "") {
             $expandedTextAdInfo->setHeadlinePart3($campaign->headline_part3);
}
if ($campaign->description1 != null && $campaign->description1 != "") {
             $expandedTextAdInfo->setDescription2($campaign->description1);
}
$ad->setExpandedTextAd($expandedTextAdInfo);
$ad->setFinalUrls([$campaign->final_url]);
$ad->setDisplayUrl($campaign->final_url);
$adGrroupAd = new AdGroupAd([
             'status' => AdGroupAdStatus::ENABLED,
             'ad_group' => $adGroupResourceName,
             'ad' => $ad
]);

But got an error:

Method Name: /google.ads.googleads.v5.services.AdGroupAdService/MutateAdGroupAds
Host: googleads.googleapis.com
Headers: {
"x-goog-api-client": "gl-php\/7.4.3 gapic\/ gax\/1.5.0 grpc\/1.31.1",
"x-goog-request-params": "customer_id=3255645407",
"developer-token": "REDACTED",
"login-customer-id": "3466391933"
}
Request: {"customerId":"3255645407","operations":[{"create":{"status":"ENABLED","adGroup":"customers/3255645407/adGroups/111788458237","ad":{"finalUrls":["seller.quanlythuoc247.com"],"displayUrl":"seller.quanlythuoc247.com","type":"EXPANDED_TEXT_AD","name":"Ad - Google shopping - US - en#44- 1","expandedTextAd":{"headlinePart1":"Gear GAG","headlinePart2":"Header line 2","headlinePart3":"Header line 3","description":"Gear gag","description2":"Description 2"}}}}]}

Response
-------
Headers: {
"request-id": "QPtTCKJRGtvtXIrUkpEqOA",
"date": "Tue, 20 Oct 2020 19:52:01 GMT",
"alt-svc": "h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: {"errors":[{"errorCode":{"operationAccessDeniedError":"OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE"},"message":"This operation is not permitted on this campaign type","trigger":{"stringValue":"SHOPPING"},"location":{"fieldPathElements":[{"fieldName":"operations","index":"0"},{"fieldName":"create"},{"fieldName":"ad"},{"fieldName":"expanded_text_ad"}]}}]} 

Plz help me to fix it.

Vào lúc 10:11:31 UTC+7 ngày Thứ Tư, 21 tháng 10, 2020, adsapiforumadvisor đã viết:

Google Ads API Forum Advisor Prod

unread,
Oct 21, 2020, 10:48:31 PM10/21/20
to maker...@gmail.com, adwor...@googlegroups.com
Hi,

Could you confirm what is the type of ad that you want to create? I can see that you created standard shopping campaign and ad group but you also created expanded text ad. Please note that expanded text ads can only be created for Search and Display campaigns, not for standard shopping campaign.

With this, since you've created a standard shopping campaign and ad group, then the ad type that you can create, which is also compatible with the said type of campaign, is shopping product ad and you may refer to this document on how to do so.

Nguyen Mark

unread,
Oct 22, 2020, 12:00:07 AM10/22/20
to AdWords API and Google Ads API Forum
Thank you for responding,

Yes I know what you said above, exactly now i want to create a shopping campaign like a campaign which i created on the UI, you can see attached pictures.

So is there a way to create a ad like this? 

1.PNG
2.PNG

3.PNG
Vào lúc 09:48:31 UTC+7 ngày Thứ Năm, 22 tháng 10, 2020, adsapiforumadvisor đã viết:

Google Ads API Forum Advisor Prod

unread,
Oct 22, 2020, 11:24:56 AM10/22/20
to maker...@gmail.com, adwor...@googlegroups.com
Hi Nguyen,

Google Ads API does not support showcase ad type, though it is supported in the AdWords API. Please refer to documented lists of supported ad groups types and ad types.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


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