Hi,

I'm exporting data via a script from the campaign_performance_report. Part 
of my script looks like this:

function get_data(campaign_dict){
  var perf_data = [["Period","Campaign 
Type","Engine","Clicks","Impressions","Cost","Conversions","Conversion 
Value"]]
  var query = "SELECT AdvertisingChannelType, Impressions, Clicks, Cost, 
Conversions, ConversionValue FROM CAMPAIGN_PERFORMANCE_REPORT WHERE 
Impressions > 0 DURING LAST_7_DAYS";
   var rows = AdsApp.report(query).rows();
  while(rows.hasNext()){
    var row = rows.next();
    perf_data.push(["This 
Week",row['AdvertisingChannelType'],"Google",row['Clicks'],row['Impressions'],row['Cost'],row['Conversions'],row['ConversionValue']]);
  }
  return perf_data;
}

I want the data to be aggregated by campaign type which is why I'm not 
selecting the campaign from the select command but the script is currently 
returning data for each campaign separetely.

How can I get the data aggregated so the output only has a row for each 
campaign type?

Thank you.
Nicky 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/61bc961f-df34-4934-bec0-8ffc4fee0ff0n%40googlegroups.com.

Reply via email to