GAQL for CampaignAsset - Why is campaign a segment?

92 views
Skip to first unread message

Ales Sturala

unread,
Sep 28, 2021, 7:33:48 AM9/28/21
to AdWords API and Google Ads API Forum
Hello,

We're implementing the new Asset system into our platform and it is kind of hard since the automatic migration didn't take place yet so all implementations have to happen without testing. Therefore we are purely dependent on the documentation.

We download Assets and CampaignAssets to see which e.g. sitelinks are created and associated with what campaigns. What is confusing is why in CampaignAsset.Campaign is a segmenting resource and not attributing resource?

As I understand CampaignAsset, it is the link/association between an asset and a campaign. This should be 1 to 1 relation, isn't it? Or if it is not, then how campaign_asset.campaign is an attribute and not a segment?


Basically I can query for the associated campaign with 2 different queries (imho) doing the same, yet in one case the documentation says that it will be report over attributes  only while in the second case that it will be segmented (so there can be more than 1 row per asset):

Query 1 - attribute:
SELECT campaign_asset.campaign FROM campaign_asset

Query 2 - segmented:
SELECT campaign.resource_name FROM campaign_asset

Both queries should do same I think.


I would expect that all campaign attributes fields should be attributes and not segments. Is this a mistake in the documentation?


Best,
 Ales

Google Ads API Forum Advisor

unread,
Sep 29, 2021, 4:31:53 AM9/29/21
to al...@trueclicks.com, adwor...@googlegroups.com
Hi Ales,

Thank you for raising your concern to my team.

To further check your concern, would you be able to provide the complete request and response logs with request ID generated on your end for the 2 queries that you've mentioned?

If you haven't enabled the logging of the API transactions for the specific client library that you are using, then please refer to the specific guide below:
You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

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


ref:_00D1U1174p._5004Q2OUkM7:ref

Ales Sturala

unread,
Sep 30, 2021, 4:19:53 AM9/30/21
to AdWords API and Google Ads API Forum
Hi Ernie,

The GAQL queries were only given as an example, the question is rather about the documentation and why the same field (imho same field) is once a segment and once an attribute.

A

Google Ads API Forum Advisor

unread,
Sep 30, 2021, 10:40:39 PM9/30/21
to al...@trueclicks.com, adwor...@googlegroups.com
Hi Ales,

The campaign_asset.campaign is an attribute in the report since it is also included in the list of attributes of a CampaignAsset.

As for the campaign resource being a segmented resource, this should allow customers to then segment the report using the (compatible) attributes of the campaign itself. As an example on how you can use the campaign segments, you may refer below :

SELECT campaign_asset.asset, campaign_asset.campaign, campaign.advertising_channel_type, campaign.advertising_channel_sub_type, campaign.name FROM campaign_asset

You may then further explore this report using the Query builder or Query validator, to also learn more which fields from the campaign resource you can use for your campaign asset reporting.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


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