RE: Questions when creating a CallOnlyAd

41 views
Skip to first unread message
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Oct 14, 2020, 11:24:47 PM10/14/20
to se...@bpmms.com, adwor...@googlegroups.com
Hi Seán,

Thanks for posting your concern.

With regard to the first item, could you clarify what type of ads you want to create and provide the code that you've used upon encountering the error?

Moving forward on setting path1 or path2 of the display URL for call only ads, I am afraid that this is not possible as according to this product level guide, path1 and path2 fields are part of the display URL of expanded text ads only. With this, these fields are also not possible to set in call only ads using Google Ads API.

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


ref:_00D1U1174p._5004Q269FuF:ref

Seán Hayes

unread,
Oct 15, 2020, 8:00:42 AM10/15/20
to AdWords API and Google Ads API Forum
To make it clear, I want to create a CallOnlyAd object. Here is my sample code for reference (Python)

# Create the ad group ad.
ad_group_ad_operation = client.get_type("AdGroupAdOperation", version="v5")
ad_group_ad = ad_group_ad_operation.create
ad_group_ad.status = client.get_type("AdGroupAdStatusEnum", version="v5").PAUSED
ad_group_ad.ad_group = ad_group_service.ad_group_path(customer_id, row['Ad group ID'])

# Set call ad info.
ad_group_ad.ad.final_urls.append(url_to_use) #Commenting out this line causes the ad to be added with no issue.

ad_group_ad.ad.call_only_ad.country_code = "US"

ad_group_ad.ad.display_url = url_to_use

ad_group_ad.ad.call_only_ad.headline1 = h1
ad_group_ad.ad.call_only_ad.headline2 = h2

ad_group_ad.ad.call_only_ad.description1 = d1
ad_group_ad.ad.call_only_ad.description2 = d2

#ad_group_ad.ad.expanded_text_ad.path1 = path1

ad_group_ad.ad.call_only_ad.call_tracked = True

ad_group_ad.ad.call_only_ad.phone_number = phone_number

ad_group_ad.ad.call_only_ad.business_name = business


print(ad_group_ad)

adgroup_operations.append(ad_group_ad_operation)

...
...

try:
ad_group_ad_response = ad_group_ad_service.mutate_ad_group_ads(
customer_id, adgroup_operations
)
except GoogleAdsException as ex:
print(
f'Request with ID "{ex.request_id}" failed with status '
f'"{ex.error.code().name}" and includes the following errors:'
)
for error in ex.failure.errors:
print(f'\tError with message "{error.message}".')
if error.location:
for field_path_element in error.location.field_path_elements:
print(f"\t\tOn field: {field_path_element.field_name}")
sys.exit(1)

Google Ads API Forum Advisor Prod

unread,
Oct 15, 2020, 9:37:10 PM10/15/20
to se...@bpmms.com, adwor...@googlegroups.com
Hi Seán,

Thank you for the clarification.

I would like to inform you that I will remove the first comment of this forum post as it contains sensitive information.

Moving forward, let me discuss the issue to my team and we will get back to you with updates about this issue.

Google Ads API Forum Advisor Prod

unread,
Nov 11, 2020, 9:12:55 PM11/11/20
to se...@bpmms.com, adwor...@googlegroups.com
Hi Seán,

Can you clarify exactly what the error message is that you're receiving?

My suspicion is that final_urls is not compatible with call_only_ads since, when a user clicks a call only add, their device places a call to the given phone number and doesn't open a web page. See this help center page for more details.

Thanks,
Ben, Google Ads API Team

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