Add a new SiteLink to and Existing AdGroup with Google Ads API Beta 0.6 (PHP)

51 views
Skip to first unread message

Vito Zongoli

unread,
Jan 30, 2019, 5:40:55 AM1/30/19
to AdWords API and Google Ads API Forum
Guys,
I'm becoming crazy...
Where I can find an example of PHP code where I can see how to add a SiteLink to an existing AdGroup?

I'm using Google Ads API Beta 0.6 and PHP.
I've used examples included into the library to create the campaign, the adGroups and the Ads but I'm struggling with the sitelinks and callouts (which should be the same thing).

Please help,
Thanks

googleadsapi...@google.com

unread,
Jan 30, 2019, 3:43:24 PM1/30/19
to AdWords API and Google Ads API Forum
Hello Vito, 

Using AdWords API, you will be able to add extensions at the account, campaign, or ad group level. You may refer to this guide which illustrates in details on how to add these extensions. The PHP code snippets to create SitelinkFeedItem and CalloutFeedItem are also available in the shared links. You may refer to this guide on how to implement Structured Snippets. The complete PHP code sample can be found here. The code snippet shared explains on how to create a Sitelink and associate with a campaign. Similarly, you will be able to use AdGroupExtensionSettingService to associate an extension to an ad group. Could you please give this a try and let me know if you have any other questions?

If you're using the Google Ads API, you may use the CampaignFeedService and AdGroupFeedService and use the PlaceholderType to create the Sitelink or Callout feeds. Currently, we do not have code samples implementing this. I have raised a feature request to the team regarding this. Please keep an eye on our blog for more updates.

Regards,
Bharani, AdWords API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Vito Zongoli

unread,
Jan 31, 2019, 6:02:58 AM1/31/19
to googleadsapi...@google.com, AdWords API and Google Ads API Forum
Dear Bharani,
thanks for the answer, I'm using Google Ads API and I saw that I can "play" with the feed service and the PlaceholderType but it's still not clear to me how to create a sitelink.
Could anybody in the team provide just a quick code example supposing that's already available and adGroupId and an adGroupResourceName?
It should be pretty quick do to for who put together these APIs.

Thanks,
Vito

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/1a0q3io0000000000n8gl0003ousguw6kmjad1i64o30c1g68qj4dhj%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Vito Zongoli

unread,
Jan 31, 2019, 6:03:32 AM1/31/19
to AdWords API and Google Ads API Forum
Dear Bharani,
thanks for the answer, I'm using Google Ads API and I saw that I can "play" with the feed service and the PlaceholderType but it's still not clear to me how to create a sitelink.
Could anybody in the team provide just a quick code example supposing that's already available and adGroupId and an adGroupResourceName?
It should be pretty quick do to for who put together these APIs.

Thanks,
Vito

googleadsapi...@google.com

unread,
Jan 31, 2019, 3:36:13 PM1/31/19
to vito.z...@gmail.com, AdWords API and Google Ads API Forum
Hello Vito, 

Currently we do not have a PHP code sample to create the Sitelink extensions. We have raised this as a feature request to the team. To get you started, please find the attached code sample in Java assuming that the feed already exists. 

Let me know if you have any other questions.

Regards,
Bharani, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Sample_Logs.rtf
Reply all
Reply to author
Forward
0 new messages