Retrieving sitelinks

796 views
Skip to first unread message

Zweitze

unread,
Jan 27, 2022, 12:02:20 PM1/27/22
to Google Ads API and AdWords API Forum
I'm trying to retrieve all sitelinks of an account, which, according to the UI, has 6587 sitelinks. I also need to determine to which group or campaign they are linked to. So for campaigns do this query:
SELECT
    campaign_asset.campaign, asset.type,
    asset.sitelink_asset.description1, asset.sitelink_asset.description2,
    asset.sitelink_asset.link_text,
    asset.final_mobile_urls, asset.final_urls
FROM campaign_asset


but I get no results (even the RequestId of the response is null?!)

When I supply a similar query for ad groups (first selected field is different, and the report clause aswell), again I get no results, and an empty RequestId.

When I just request all assets, using this query:
SELECT
    asset.type,
    asset.sitelink_asset.description1, asset.sitelink_asset.description2,
    asset.sitelink_asset.link_text,
    asset.final_mobile_urls, asset.final_urls
FROM asset

I get 2865 results, but none of them is a Sitelink asset (RequestId "K9SnSsmAufHV8_Rsh8KUEw")

All results were executed against account 510-237-3090

What could explain this behaviour?
And what is the recommended way to retrieve existing sitelinks, their level, and the group or campaign they're connected to?

Thanks!

Google Ads API Forum Advisor

unread,
Jan 28, 2022, 7:50:04 AM1/28/22
to zwe...@gmail.com, adwor...@googlegroups.com
Hi Zweitze,

Thank you for posting your concern.

It appears that your extensions are not migrated yet to asset-based extensions and this is the possible reason why you can't get any data using the asset related reports. With this, you could try to follow this guide to migrate your extensions to asset-based extension, then you can try the report again.

Let me know how it goes after.

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


ref:_00D1U1174p._5004Q2VQ9mn:ref

Zweitze

unread,
Jan 28, 2022, 10:00:01 AM1/28/22
to Google Ads API and AdWords API Forum
Thanks for reporting that these extensions are not asset-based. Unfortunately I cannot change this account, I only have to report on it. Actually I have hundreds of accounts, and I am supposed to report on all of these too.

So it appears I have to write multiple sets of code, for asset-based extensions and feed-based extensions. Would you agree?

How does one find out that extensions of an account are feed-based or asset-based?

kheny banguis

unread,
Jan 29, 2022, 4:53:50 AM1/29/22
to adwor...@googlegroups.com
Ok thank you... 

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/71Ebq000000000000000000000000000000000000000000000R6F7N200Am7x5nu-SPyzn31o8dtvjw%40sfdc.net.

Google Ads API Forum Advisor

unread,
Jan 30, 2022, 8:01:17 PM1/30/22
to kenima...@gmail.com, adwor...@googlegroups.com

Hi Zweitze,

Thanks for getting back to us.

You may check this guide for Identify Feed-based extensions. Let us know if you have any further questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2VQ9mn:ref

Ngon Nguyen

unread,
Jan 31, 2022, 2:13:52 AM1/31/22
to ads...@forumsupport.google, kenima...@gmail.com, AdWords API and Google Ads API Forum

Vào 8:01, Th 2, 31 thg 1, 2022 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum <adwor...@googlegroups.com> đã viết:
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.

Zweitze

unread,
Feb 3, 2022, 8:22:06 AM2/3/22
to Google Ads API and AdWords API Forum
Hi,

Thanks for the link to the guide! I dismissed that part of the documentation because, well, I will not write code to migrate accounts. But I learnt it's really helpful for learning to deal with feed-based extensions, thanks again.

Another question though:
I understand Google will be migrating feed-based extensions to asset-based extensions. And I need to write code that can deal with both situations - just reporting, usually read-only access. So, for a given account, I will have to try both asset reports and feed reports. Would you agree?

I am wondering what happens when a Google-initiated migration just finished. My code may retrieve sitelinks from both asset reports and feed reports, and therefore get double entries. I this a valid concern?
How can I detect this situation? For instance, will the feed mapping be disabled after migration, or will the feed items be disabled?

Thanks!

Google Ads API Forum Advisor

unread,
Feb 3, 2022, 8:56:05 AM2/3/22
to zwe...@gmail.com, adwor...@googlegroups.com
Hi Zweite,

In Asset-based Extensions Migration guide it states that if both Asset-based and Feed-based extensions of a particular type are attached to the same customer, campaign, or ad group, the Asset-based extensions will be served. This only applies for entities at the same level. So for example, linking an asset to an ad group will prevent all feeds serving on that ad group, but other ad groups in the same campaign may continue serving feeds. Once you migrate a sitelink at ad group level in that ad group you will have to migrate all sitelink extensions in that ad group for all sitelink extensions to serve in that ad group. But auto migration will migrate all of the extensions so all will serve.

As soon as an extension is migrated the asset based one will start serving and the extension setting one will stop serving.

Regarding reporting,  asset_field_type_view will cover on any level the asset extension is connected.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2VQ9mn:ref

Zweitze

unread,
Feb 4, 2022, 9:12:05 AM2/4/22
to Google Ads API and AdWords API Forum
Thanks, I almost got everything working.
I plan to retrieve the old feed-based extensions using a where clause, something like

SELECT <fields>
FROM campaign_extension_setting
WHERE campaign_extension_setting.extension_type = 'SITELINK'
  AND campaign.id NOT IN (1, 2, 3, 4)

And the IDs 1,2,3 and 4 showed up at a previous call to retrieve asset-based extensions and their associations to campaigns.
That should be the way to ensure we leave out migrated extensions, right?

The question I have - I also need to obtain sitelinks associated with groups, and some accounts have thousands of groups.
Is there any limitation on defining a set in AWQL?
And do AWQL queries have a limit in size? I know other APIs that enforce a limit of 10 MB per request.

So the question is now about general limitations on AWQL queries.

Google Ads API Forum Advisor

unread,
Feb 4, 2022, 3:53:59 PM2/4/22
to zwe...@gmail.com, adwor...@googlegroups.com
Hi Zweite,

According to timeouts there is no set limit in AdWords API and AdWords uses AWQL. In Ads API the limits on a request are 100,000 rows and Ads API uses GAQL . You may hit rate limits set depending on server load, but on an individual account it looks like you won't have a problem.

Any extension that isn't working anymore won't create metrics, if you are attempting to determine which extension setting is still serving you can follow our Auto-migrated accounts detection guide

Your GAQL query looks feasible for what you want to do.
Reply all
Reply to author
Forward
0 new messages