Generating a report using a script through Adwords.

I get an "Invalid reporting query" error. I researched the my code 
extensively and I can't see what is wrong with my query. I found this 
article "https://groups.google.com/forum/#!topic/adwords-scripts/-b1diiebrAs"; 
which I think is related but I call out the account ID's as a variable so 
confused.


function main() {
////////////////////////////////////////////////////////////////////////////////
 Options
var startDate = "2015-01-01";var endDate = "2015-12-07";

var currencySymbol = "$";
var campaignNameContains = "";
var ids = "325-688-1878";
var spreadsheetUrl = 
"https://docs.google.com/spreadsheets/d/1flJAypUujfk-HzFRI9wfWoJB60h2N7cdV_i8t_dpDlI/edit#gid=0";;


//////////////////////////////////////////////////////////////////////////////
// Thresholds
var impressionThreshold = 10;var clickThreshold = 0;var costThreshold = 0;var 
conversionThreshold = 0;// Words will be ignored if their statistics are lower 
than any of these thresholds

////////////////////////////////////////////////////////////////////////////////
 Find the negative keywords
var negativesByGroup = [];var negativesByCampaign = [];var sharedSetData = 
[];var sharedSetNames = [];var sharedSetCampaigns = [];var dateRange = 
startDate.replace(/-/g, "") + "," + endDate.replace(/-/g, "");var 
activeCampaignIds = [];
// Gather ad group level negative keywords
var keywordReport = AdWordsApp.report("SELECT CampaignId, AdGroupId, 
KeywordText, KeywordMatchType " +"FROM   KEYWORDS_PERFORMANCE_REPORT " +"WHERE 
CampaignStatus = ENABLED AND AdGroupStatus = ENABLED AND Status = ENABLED AND 
IsNegative = TRUE " +"AND CampaignName CONTAINS_IGNORE_CASE '" + 
campaignNameContains + "' " +"AND campaignId CONTAINS_IGNORE_CASE '" + ids + "' 
" +"DURING " + dateRange);

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cfe130d6-41ad-4d5e-99d6-297af30d555f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to