How to filter trial campaigns

99 views
Skip to first unread message

SP

unread,
Oct 2, 2017, 6:10:46 AM10/2/17
to AdWords API Forum
Hi!

I'm using this google adwords api version: v201705

I need to filter the trial (experiments) campigns to be able to retreive only the standalone campaings,
i'm trying using SelectorBuilder.equals operation with something like this:

equals(Campaign.Id, Campaign.baseCampaignId) 

but with that I cannot retreive any campaign at all,

how can I filter the trials campaigns to be able to only retreive the standalone campaings?

Many thanks!

Bharani Cherukuri (AdWords API Team)

unread,
Oct 2, 2017, 1:53:49 PM10/2/17
to AdWords API Forum
Hello,

If you're using the services to retrieve the campaign details, you can use the CampaignService. If you're using the API reports, you will be able to retrieve the experiment reports like the usual campaign reports using the Campaign Performance Report. The baseCampaignId field on campaigns represents the base campaign. The campaignTrialType field is used to distinguish between the regular and trial campaigns. For normal campaigns, the campaignTrialType is set to BASE. For draft and trial campaigns, the campaignTrialType is set to DRAFT and TRIAL respectively. You will be able to use the same fields for both services and report types. Please refer to the documentation here for services and reports. I should also mention that since the draft campaigns don't serve ads, they will not appear in the reports, even if you specifically request them or set includeZeroImpressions to true.

Thanks,
Bharani, AdWords API Team

Bharani Cherukuri (AdWords API Team)

unread,
Oct 3, 2017, 1:37:48 PM10/3/17
to AdWords API Forum
Hello, 

From what I understand, you're trying to filter the campaigns by trying to compare the values of two fields (CampaignId and baseCampaignId) in a single predicate. I'm afraid its not possible to use predicates in this manner. To filter for standalone campaigns, you need to add a predicate for CampaignTrialType field as: equals(CampaignField.CampaignTrialType, "BASE")

Let me know if you have any other questions.

Regards,
Bharani, AdWords API Team

On Monday, October 2, 2017 at 6:10:46 AM UTC-4, SP wrote:
Reply all
Reply to author
Forward
0 new messages