How to apply filter on Campaign Performance Report

140 views
Skip to first unread message

Ramakrishna BS

unread,
Nov 25, 2013, 9:24:40 AM11/25/13
to adwor...@googlegroups.com

After connecting to API console to get the required reports, we were able to generate the reports clients based. We need to have the following additional condition to be placed in our report to filter the data, kindly help me on this.

 We are currently generating Campaign Performance report (Yesterday’s date) thru our C# code. We need to have some limited columns over there, currently we are getting following fields.

 // Create selector.

Selector selector = new Selector();

selector.fields = new string[] { "AccountDescriptiveName", "Date", "CampaignName", "Clicks", "Impressions", "Cost"};

 

But apart from this we need to have, ClickType as another column in our report, as per my analysis, ClickType is not a direct field in Selector, so need to write some Predicate for that, the same way I tried, but couldn’t succeeded. The same way using Predicate I written code for “Status”, that working fine where as “ClickType ” is not working either with Predicate or regular fields.

 

The following code for ClickType using Predicate is not working. It is not even generating any of client reports,

 

Predicate predicateHeadLine = new Predicate();

predicateHeadLine.field = "ClickType";

predicateHeadLine.@operator = PredicateOperator.IN;

predicateHeadLine.values = new string[] { "URL_CLICKS" };

selector.predicates = new Predicate[] { predicateHeadLine };

 

definition.selector = selector;

 

The same way I used for Status using Predicate, the below code is working fine if I commented above code.

 

Predicate predicateStatus = new Predicate();

       predicateStatus.field = "Status";

       predicateStatus.@operator = PredicateOperator.IN;

       predicateStatus.values = new string[] { "ACTIVE", "PAUSED" };

       selector.predicates = new Predicate[] { predicateStatus };

 

 

But I want ClickType to be in my report, so then only I can validate my data. I need ClickType with Headline data only, the rest I should avoid, so that is the reason am trying to get ClickType in my report.

Thanks in advance.

Rooney Achilles

unread,
Nov 25, 2013, 12:47:39 PM11/25/13
to trueac...@gsicommerce.com, adwor...@googlegroups.com
Hi RamaKrishna,

I hope you are already aware of the 'ClickType' predicate filters zero impressions rows in performance report. It filters how often your ad is served with that ClickType-Headline.



--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ramakrishna BS

unread,
Nov 25, 2013, 1:15:04 PM11/25/13
to adwor...@googlegroups.com, trueac...@gsicommerce.com
Hi Sanju,

Yes I understand the ClickType does the same. But it is not working when I placed the code like i given. I need the data with ClickType = 'Headline', the rest i should avoid. But whenever I try to give ClickType either in fields / predicates it is not working. As per my code, did do any mistake in that?




On Monday, November 25, 2013 12:47:39 PM UTC-5, Sanju wrote:
Hi RamaKrishna,

I hope you are already aware of the 'ClickType' predicate filters zero impressions rows in performance report. It filters how often your ad is served with that ClickType-Headline.

On Mon, Nov 25, 2013 at 7:54 PM, Ramakrishna BS <trueac...@gsicommerce.com> wrote:

After connecting to API console to get the required reports, we were able to generate the reports clients based. We need to have the following additional condition to be placed in our report to filter the data, kindly help me on this.

 We are currently generating Campaign Performance report (Yesterday’s date) thru our C# code. We need to have some limited columns over there, currently we are getting following fields.

 // Create selector.

Selector selector = new Selector();

selector.fields = new string[] { "AccountDescriptiveName", "Date", "CampaignName", "Clicks", "Impressions", "Cost"};

 

But apart from this we need to have, ClickType as another column in our report, as per my analysis, ClickType is not a direct field in Selector, so need to write some Predicate for that, the same way I tried, but couldn’t succeeded. The same way using Predicate I written code for “Status”, that working fine where as “ClickType ” is not working either with Predicate or regular fields.

 

The following code for ClickType using Predicate is not working. It is not even generating any of client reports,

 

Predicate predicateHeadLine = new Predicate();

predicateHeadLine.field = "ClickType";

predicate...@operator = PredicateOperator.IN;

predicateHeadLine.values = new string[] { "URL_CLICKS" };

selector.predicates = new Predicate[] { predicateHeadLine };

 

definition.selector = selector;

 

The same way I used for Status using Predicate, the below code is working fine if I commented above code.

 

Predicate predicateStatus = new Predicate();

       predicateStatus.field = "Status";

       predicat...@operator = PredicateOperator.IN;

       predicateStatus.values = new string[] { "ACTIVE", "PAUSED" };

       selector.predicates = new Predicate[] { predicateStatus };

 

 

But I want ClickType to be in my report, so then only I can validate my data. I need ClickType with Headline data only, the rest I should avoid, so that is the reason am trying to get ClickType in my report.

Thanks in advance.

varta convonix

unread,
Nov 27, 2013, 12:50:33 AM11/27/13
to adwor...@googlegroups.com
Hi Ramakrishna,

What is the error generated?
Try including "Click Type" in your selector list like below:
// Create the selector.
      Selector selector = new Selector();
      selector.fields = new string[] {"AccountDescriptiveName", "Date", "CampaignName", "Clicks", "Impressions", "Cost"};

      // Create the predicates.
      Predicate predicate = new Predicate();
      predicate.field = "ClickType";
      predicate.@operator = PredicateOperator.IN;
      predicate.values = new string[] {"URL_CLICKS"};
      selector.predicates = new Predicate[] {predicate};


Varta


On Monday, November 25, 2013 7:54:40 PM UTC+5:30, Ramakrishna BS wrote:

After connecting to API console to get the required reports, we were able to generate the reports clients based. We need to have the following additional condition to be placed in our report to filter the data, kindly help me on this.

 We are currently generating Campaign Performance report (Yesterday’s date) thru our C# code. We need to have some limited columns over there, currently we are getting following fields.

 // Create selector.

Selector selector = new Selector();

selector.fields = new string[] { "AccountDescriptiveName", "Date", "CampaignName", "Clicks", "Impressions", "Cost"};

 

But apart from this we need to have, ClickType as another column in our report, as per my analysis, ClickType is not a direct field in Selector, so need to write some Predicate for that, the same way I tried, but couldn’t succeeded. The same way using Predicate I written code for “Status”, that working fine where as “ClickType ” is not working either with Predicate or regular fields.

 

The following code for ClickType using Predicate is not working. It is not even generating any of client reports,

 

Predicate predicateHeadLine = new Predicate();

predicateHeadLine.field = "ClickType";

predicate...@operator = PredicateOperator.IN;

predicateHeadLine.values = new string[] { "URL_CLICKS" };

selector.predicates = new Predicate[] { predicateHeadLine };

 

definition.selector = selector;

 

The same way I used for Status using Predicate, the below code is working fine if I commented above code.

 

Predicate predicateStatus = new Predicate();

       predicateStatus.field = "Status";

       predicat...@operator = PredicateOperator.IN;

Reply all
Reply to author
Forward
0 new messages