Re: How to get the top performing ad for a campaign?
Ah okay that wasn't clear to me. Thank you! On Thursday, May 29, 2014 7:32:40 AM UTC-6, Michael Cloonan (AdWords API Team) wrote: Hello, The ReportDefinitionServicehttps://developers.google.com/adwords/api/docs/reference/v201402/ReportDefinitionService is not meant for running reports, but rather for fetching information about what fields are supported in different reports. We also make all this information on our Report Typeshttps://developers.google.com/adwords/api/docs/appendix/reportspage, so you can avoid using this service altogether by referencing this page. In order to actually run a report, please see our Reporting Basicshttps://developers.google.com/adwords/api/docs/guides/reportingguide. You can also look at any of our PHP Reportinghttps://github.com/googleads/googleads-php-lib/tree/master/examples/AdWords/v201402/Reportingexamples. I recommend using AWQLhttps://developers.google.com/adwords/api/docs/guides/awqlto fetch reports, which is a SQL-like language specifically for AdWords. For example, you could do something like this: SELECT Id, Ctr FROM AD_PERFORMANCE_REPORT WHERE CampaignId IN (...) DURING 20140501,20140529 ORDER BY Ctr DESC LIMIT 0,50 You can add whatever fields/predicates/timeframe you like. Both ordering and paging do work when running the report, just not when fetching report definitions. Regards, Mike, AdWords API Team On Wednesday, May 28, 2014 6:51:47 PM UTC-4, Jake Wilson wrote: I'm looking at all the ads for a campaign. I want to fetch the top performing ad from the campaign. By top performing I guess I would choose the ad with the highest CTR maybe? Or maybe the Conversion rate. Anyways, I'm doing this kind of thing: $user = new AdWordsUser(); $user-setClientCustomerId($accountId); $user-LoadService('ReportDefinitionService', ADWORDS_VERSION); $selector = new Selector(); $selector-fields = array(.); $selector-predicates[] = new Predicate('CampaignId', 'IN', $campaignIds); $reportDefinition = new ReportDefinition(); $reportDefinition-selector = $selector; $reportDefinition-reportName = 'Ad performance report #' . uniqid(); $reportDefinition-dateRangeType = LAST_30_DAYS; $reportDefinition-reportType = 'AD_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-includeZeroImpressions = FALSE; The problem with this API call is that it returns ALL the ads (218 ads for this particular campaign I'm testing on). And I don't think the ads are sorted in any logical way that I can see. Maybe by adID ascending. Anyways, I tried to add two things to my selector: $selector-ordering[] = new OrderBy('Ctr', 'DESCENDING'); Gives the error: *Report download failed. Underlying errors are Type = 'ReportDefinitionError.SORTING_NOT_SUPPORTED', Trigger = 'Sorting is not supported for reports', FieldPath = ''.* Also, in order to just return the first result only (which work work if I could get ordering to work), I tried using paging: $selector-paging = new Paging(0,1); But I get *Report download failed. Underlying errors are Type = 'ReportDefinitionError.PAGING_NOT_SUPPORTED', Trigger = 'Paging is not supported for reports', FieldPath = ''.* Okay so downloading reports supports neight ordering or paging/limiting? Am I only able to just fetch ALL the ads and I need to manually sort through them myself? That doesn't seem right... Am I missing something here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How to get the top performing ad for a campaign?
One more question about this. I have the following AWQL query: SELECT Id,Clicks,Headline,Description1,Description2,DisplayUrl,Impressions,Clicks,Cost,Conversions,ConversionRate,Ctr FROM AD_PERFORMANCE_REPORT WHERE Status IN [ENABLED,PAUSED] DURING 20140522,20140528 ORDER BY Clicks ASC I get: Report download failed. Underlying errors are Type = 'QueryError.INVALID_ORDER_BY_CLAUSE', Trigger = '', FieldPath = ''. It doesn't like that ORDER BY syntax apparently. What am I doing wrong here? The order and syntax appears to match examples that I'm referencing. The query works just fine without the ORDER BY clause. On Thursday, May 29, 2014 8:56:23 AM UTC-6, Jake Wilson wrote: Ah okay that wasn't clear to me. Thank you! On Thursday, May 29, 2014 7:32:40 AM UTC-6, Michael Cloonan (AdWords API Team) wrote: Hello, The ReportDefinitionServicehttps://developers.google.com/adwords/api/docs/reference/v201402/ReportDefinitionService is not meant for running reports, but rather for fetching information about what fields are supported in different reports. We also make all this information on our Report Typeshttps://developers.google.com/adwords/api/docs/appendix/reportspage, so you can avoid using this service altogether by referencing this page. In order to actually run a report, please see our Reporting Basicshttps://developers.google.com/adwords/api/docs/guides/reportingguide. You can also look at any of our PHP Reportinghttps://github.com/googleads/googleads-php-lib/tree/master/examples/AdWords/v201402/Reportingexamples. I recommend using AWQLhttps://developers.google.com/adwords/api/docs/guides/awqlto fetch reports, which is a SQL-like language specifically for AdWords. For example, you could do something like this: SELECT Id, Ctr FROM AD_PERFORMANCE_REPORT WHERE CampaignId IN (...) DURING 20140501,20140529 ORDER BY Ctr DESC LIMIT 0,50 You can add whatever fields/predicates/timeframe you like. Both ordering and paging do work when running the report, just not when fetching report definitions. Regards, Mike, AdWords API Team On Wednesday, May 28, 2014 6:51:47 PM UTC-4, Jake Wilson wrote: I'm looking at all the ads for a campaign. I want to fetch the top performing ad from the campaign. By top performing I guess I would choose the ad with the highest CTR maybe? Or maybe the Conversion rate. Anyways, I'm doing this kind of thing: $user = new AdWordsUser(); $user-setClientCustomerId($accountId); $user-LoadService('ReportDefinitionService', ADWORDS_VERSION); $selector = new Selector(); $selector-fields = array(.); $selector-predicates[] = new Predicate('CampaignId', 'IN', $campaignIds); $reportDefinition = new ReportDefinition(); $reportDefinition-selector = $selector; $reportDefinition-reportName = 'Ad performance report #' . uniqid(); $reportDefinition-dateRangeType = LAST_30_DAYS; $reportDefinition-reportType = 'AD_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-includeZeroImpressions = FALSE; The problem with this API call is that it returns ALL the ads (218 ads for this particular campaign I'm testing on). And I don't think the ads are sorted in any logical way that I can see. Maybe by adID ascending. Anyways, I tried to add two things to my selector: $selector-ordering[] = new OrderBy('Ctr', 'DESCENDING'); Gives the error: *Report download failed. Underlying errors are Type = 'ReportDefinitionError.SORTING_NOT_SUPPORTED', Trigger = 'Sorting is not supported for reports', FieldPath = ''.* Also, in order to just return the first result only (which work work if I could get ordering to work), I tried using paging: $selector-paging = new Paging(0,1); But I get *Report download failed. Underlying errors are Type = 'ReportDefinitionError.PAGING_NOT_SUPPORTED', Trigger = 'Paging is not supported for reports', FieldPath = ''.* Okay so downloading reports supports neight ordering or paging/limiting? Am I only able to just fetch ALL the ads and I need to manually sort through them myself? That doesn't seem right... Am I missing something here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com
Re: How to get the top performing ad for a campaign?
I also get a similar error when using LIMIT... Any clues? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How to get the top performing ad for a campaign?
Thank you for looking into this Michael. If you could reply to this post when you discover the answer or if/when it's fixed I would appreciate it. In the meantime I will run my query to grab everything and then sort it locally. Thanks, -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
How to get the top performing ad for a campaign?
I'm looking at all the ads for a campaign. I want to fetch the top performing ad from the campaign. By top performing I guess I would choose the ad with the highest CTR maybe? Or maybe the Conversion rate. Anyways, I'm doing this kind of thing: $user = new AdWordsUser(); $user-setClientCustomerId($accountId); $user-LoadService('ReportDefinitionService', ADWORDS_VERSION); $selector = new Selector(); $selector-fields = array(.); $selector-predicates[] = new Predicate('CampaignId', 'IN', $campaignIds); $reportDefinition = new ReportDefinition(); $reportDefinition-selector = $selector; $reportDefinition-reportName = 'Ad performance report #' . uniqid(); $reportDefinition-dateRangeType = LAST_30_DAYS; $reportDefinition-reportType = 'AD_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-includeZeroImpressions = FALSE; The problem with this API call is that it returns ALL the ads (218 ads for this particular campaign I'm testing on). And I don't think the ads are sorted in any logical way that I can see. Maybe by adID ascending. Anyways, I tried to add two things to my selector: $selector-ordering[] = new OrderBy('Ctr', 'DESCENDING'); Gives the error: *Report download failed. Underlying errors are Type = 'ReportDefinitionError.SORTING_NOT_SUPPORTED', Trigger = 'Sorting is not supported for reports', FieldPath = ''.* Also, in order to just return the first result only (which work work if I could get ordering to work), I tried using paging: $selector-paging = new Paging(0,1); But I get *Report download failed. Underlying errors are Type = 'ReportDefinitionError.PAGING_NOT_SUPPORTED', Trigger = 'Paging is not supported for reports', FieldPath = ''.* Okay so downloading reports supports neight ordering or paging/limiting? Am I only able to just fetch ALL the ads and I need to manually sort through them myself? That doesn't seem right... Am I missing something here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Fetch all campaigns for all accounts w/o iterating thru accounts?
We have multiple accounts in our MMC. Right now, in order to fetch a list of campaigns, it's on a per-account basis. That is, we have to specify which account we want to fetch campaigns for: $user = new AdWordsUser(); $user-setClientCustomerId($accountId); $campaignService = $user-GetService('CampaignService', ADWORDS_VERSION); $selector = new Selector(); $selector-fields = array( 'Id', 'Name', 'Status', etc... So this means, that if we want to get a list of ALL campaigns for our MMC, we have to iterate through each account, and get the campaigns for each account, thus requiring multiple calls to the API. Is it possible to fetch all campaigns at once? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Fetch all campaigns for all accounts w/o iterating thru accounts?
Also, I've tried to do a structure report, but it tells me The client customer ID must be specified for report downloads. Any clues on this? On Tuesday, April 22, 2014 12:27:12 PM UTC-6, Jake Wilson wrote: We have multiple accounts in our MMC. Right now, in order to fetch a list of campaigns, it's on a per-account basis. That is, we have to specify which account we want to fetch campaigns for: $user = new AdWordsUser(); $user-setClientCustomerId($accountId); $campaignService = $user-GetService('CampaignService', ADWORDS_VERSION); $selector = new Selector(); $selector-fields = array( 'Id', 'Name', 'Status', etc... So this means, that if we want to get a list of ALL campaigns for our MMC, we have to iterate through each account, and get the campaigns for each account, thus requiring multiple calls to the API. Is it possible to fetch all campaigns at once? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: PHP API Custom date range for AD_PERFORMANCE_REPORT
Doh! Thanks! On Tuesday, March 18, 2014 5:28:31 AM UTC-6, Danial Klimkin wrote: Hello Jake, The date range is part of the selector, not definition, so: $selector-dateRange = new DateRange('20140101', '20140110'); $reportDefinition-dateRangeType = 'CUSTOM_DATE'; - Danial, AdWords API Team. On Tuesday, March 18, 2014 3:02:20 AM UTC+4, Jake Wilson wrote: Trying to get an ad performance report for a custom range: $reportDefinition = new ReportDefinition(); $reportDefinition-selector = $selector; $reportDefinition-reportName = 'Ad performance report #' . uniqid(); $reportDefinition-dateRange = new DateRange('20140101', '20140110'); $reportDefinition-dateRangeType = 'CUSTOM_DATE'; $reportDefinition-reportType = 'AD_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-includeZeroImpressions = FALSE; // Report Options $options = array('version' = ADWORDS_VERSION, 'returnMoneyInMicros' = FALSE); // Download Report $response = ReportUtils::DownloadReport($reportDefinition, null, $user, $options); I get the following error: Report download failed. Underlying errors are Type = 'ReportDownloadError.INVALID_REPORT_DEFINITION_XML', Trigger = 'Invalid ReportDefinition Xml: cvc-complex-type.2.4.d: Invalid content was found starting with element 'dateRange'. No child element is expected at this point.', FieldPath = ''. If I get rid of the dateRange and just do $reportDefinition-dateRangeType = 'LAST_7_DAYS'; Then it works fine. What am I missing here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
PHP API Custom date range for AD_PERFORMANCE_REPORT
Trying to get an ad performance report for a custom range: $reportDefinition = new ReportDefinition(); $reportDefinition-selector = $selector; $reportDefinition-reportName = 'Ad performance report #' . uniqid(); $reportDefinition-dateRange = new DateRange('20140101', '20140110'); $reportDefinition-dateRangeType = 'CUSTOM_DATE'; $reportDefinition-reportType = 'AD_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-includeZeroImpressions = FALSE; // Report Options $options = array('version' = ADWORDS_VERSION, 'returnMoneyInMicros' = FALSE); // Download Report $response = ReportUtils::DownloadReport($reportDefinition, null, $user, $options); I get the following error: Report download failed. Underlying errors are Type = 'ReportDownloadError.INVALID_REPORT_DEFINITION_XML', Trigger = 'Invalid ReportDefinition Xml: cvc-complex-type.2.4.d: Invalid content was found starting with element 'dateRange'. No child element is expected at this point.', FieldPath = ''. If I get rid of the dateRange and just do $reportDefinition-dateRangeType = 'LAST_7_DAYS'; Then it works fine. What am I missing here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: PHP Lib - Report data w/o pre-formatted downloaded report file?
Ah excellent. I will look into that approach. Thanks! Jake On Friday, March 14, 2014 8:02:41 AM UTC-6, Josh Radcliff (AdWords API Team) wrote: Hi, Although the example shows how to download to a file, you can download a report and just process it in memory. Simply pass NULL for the second argument to *DownloadReportWithAwql* (or *DownloadReport*). $adwords_config = array( 'server'= 'https://adwords.google.com', 'version' = 'v201402', ); $response = ReportUtils::DownloadReportWithAwql( $query, NULL, $user, self::FORMAT_XML, $adwords_config); return simplexml_load_string($response); The API also allows you to specify different formats for your report, e.g., XML as in the example above. It sounds like this would be preferable for your use case. Cheers, Josh, AdWords API Team On Friday, March 14, 2014 12:43:24 AM UTC-4, Jake Wilson wrote: Using the PHP Lib, there is the ReportUtils.php class(es). The way the example scripts work for reporting is that your report is downloaded to a file on your computer. The file is pre-formatted sort of like this: Report Title Blah Blah StartDate - End Date CSV column description data rows (csv style) data rows (csv style) data rows (csv style) data rows (csv style) Totals --- --- --- -- I've been glancing through the code and there isn't any sort of option to just download the data directly as an array or json or whatever. Why is this? Every other aspect of the library fetches data directly to variables and class structures. Why do the reports require you to download a file to your filesystem that you need to turn around and parse? Looking at the above file, I just want the data. I don't want the Title line or columns descriptions or totals at the bottom. I just want the data. Right now I am simply downloading the file, then reading it in and parsing it and then deleting the file. But it would be nice if downloading this data was more consistent with the rest of the PHP Lib. Any thoughts or explanations on why this is? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
PHP Lib - Report data w/o pre-formatted downloaded report file?
Using the PHP Lib, there is the ReportUtils.php class(es). The way the example scripts work for reporting is that your report is downloaded to a file on your computer. The file is pre-formatted sort of like this: Report Title Blah Blah StartDate - End Date CSV column description data rows (csv style) data rows (csv style) data rows (csv style) data rows (csv style) Totals --- --- --- -- I've been glancing through the code and there isn't any sort of option to just download the data directly as an array or json or whatever. Why is this? Every other aspect of the library fetches data directly to variables and class structures. Why do the reports require you to download a file to your filesystem that you need to turn around and parse? Looking at the above file, I just want the data. I don't want the Title line or columns descriptions or totals at the bottom. I just want the data. Right now I am simply downloading the file, then reading it in and parsing it and then deleting the file. But it would be nice if downloading this data was more consistent with the rest of the PHP Lib. Any thoughts or explanations on why this is? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: PHP AdGroupService SelectorError.INVALID_FIELD_NAME @ serviceSelector
This is actually pretty for me to recreate. I'm using the PHP library examples (v201309). All I did was edit the GetAdGroups.php example file. I set my campaignId at the top of the script. Then at the bottom after instantiating the user I set a ClientCustomerId: $user = new AdWordsUser(); $user-setClientCustomerId(50xxx526); Then earlier in the script I edited the selector to be like this: // Create selector. $selector = new Selector(); $selector-fields = array( 'BidType', 'BiddingStrategyId', 'BiddingStrategyName', 'BiddingStrategySource', 'BiddingStrategyType', 'CampaignId', 'CampaignName', 'ContentBid', 'ContentBidCriterionTypeGroup', 'CpcBid', 'CpcBidSource', 'CpmBid', 'CpmBidSource', 'EnhancedCpcEnabled', 'ExperimentDeltaStatus', 'ExperimentId', 'ExperimentRowStatus', 'Id', 'MaxContentCpcMultiplier', 'MaxCpcMultiplier', 'MaxCpmMultiplier', 'Name', 'PageOnePromotedBidCeiling', 'PageOnePromotedBidChangesForRaisesOnly', 'PageOnePromotedBidModifier', 'PageOnePromotedRaiseBidWhenBudgetConstained', 'PageOnePromotedRaiseBidWhenLowQualityScore', 'PageOnePromotedStrategyGoal', 'PercentCpaBid', 'PercentCpaBidSource', 'PricingMode', 'Settings', 'Status', 'TargetCpa', 'TargetCpaBid', 'TargetSpendBidCeiling', 'TargetSpendSpendTarget', ); $selector-ordering[] = new OrderBy('Name', 'ASCENDING'); That array now includes every single queriable field according to: https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201309-AdGroupService And when running the script I get: An error has occurred: [SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'CpcBidSource', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'CpmBidSource', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'ExperimentRowStatus', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedBidCeiling', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedBidChangesForRaisesOnly', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedBidModifier', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedRaiseBidWhenBudgetConstained', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedRaiseBidWhenLowQualityScore', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedStrategyGoal', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PercentCpaBidSource', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PricingMode', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'TargetSpendBidCeiling', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'TargetSpendSpendTarget'] Here is the the request_info.log [Mar 05 2014 11:20:39.00 - ERROR] email= effectiveUser=5xxx6 service=AdGroupService method=get operators={} responseTime=192 requestId=000xxx648 operations=1 units= server=adwords.google.com isFault=true faultMessage=[SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'CpcBidSource', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'CpmBidSource', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'ExperimentRowStatus', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedBidCeiling', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedBidChangesForRaisesOnly', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedBidModifier', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedRaiseBidWhenBudgetConstained', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedRaiseBidWhenLowQualityScore', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PageOnePromotedStrategyGoal', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PercentCpaBidSource', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'PricingMode', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'TargetSpendBidCeiling', SelectorError.INVALID_FIELD_NAME @ serviceSelector; trigger:'TargetSpendSpendTarget'] If I remove the invalid fields from the array in the script, then I get back a response just fine. On Tuesday, March 4, 2014 4:33:43 PM UTC-7, Ray Tsang (AdWords API Team) wrote: Jake, Could I trouble you to confirm if you were using AdGroupService? For those fields that weren't selectable: 1. did you select the field by itself, or in combination with other fields? 2. could I trouble you to send me the response xml (without any sensitive information, such as developer token, or access token, etc). Thanks, Ray On Tuesday, March 4, 2014 5:51:03 PM UTC-5, Jake Wilson wrote: I'm using the PHP lib. According to the following page: https
How to get cost, clicks, impressions etc for keyword?
I'm using the PHP lib. Can't figure out how to get various reporting information for a specific keyword in an Adgroup in a certain date range. Also I can't figure out how to get the same values for the sum of all keywords in an Adgroup for a date range. I think that I'm mostly confused on the naming conventions of various services and how they relate to what I see in the Adwords dashboard. For example I see that AdGroupCriterionService is how you get various keywords in an Ad Group. But according to: https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201309-AdGroupAdService There isn't anything about fetching the cost, clicks, impressions, CTR, etc or set a date range for the data. I think that I need to do something maybe the DataService or AdGroupAdService but I'm not sure. There doesn't appear to be any obvious examples in the PHP Lib for these objects. Can anyone point me in the right direction? Jake -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
PHP AdGroupService SelectorError.INVALID_FIELD_NAME @ serviceSelector
I'm using the PHP lib. According to the following page: https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201309-AdGroupService I should be able to query for the following values: BidType BiddingStrategyId BiddingStrategyName BiddingStrategySource BiddingStrategyType CampaignId CampaignName ContentBid ContentBidCriterionTypeGroup CpcBid CpcBidSource CpmBid CpmBidSource EnhancedCpcEnabled ExperimentDeltaStatus ExperimentId ExperimentRowStatus Id MaxContentCpcMultiplier MaxCpcMultiplier MaxCpmMultiplier Name PageOnePromotedBidCeiling PageOnePromotedBidChangesForRaisesOnly PageOnePromotedBidModifier PageOnePromotedRaiseBidWhenBudgetConstained PageOnePromotedRaiseBidWhenLowQualityScore PageOnePromotedStrategyGoal PercentCpaBid PercentCpaBidSource PricingMode Settings Status TargetCpa TargetCpaBid TargetSpendBidCeiling TargetSpendSpendTarget When I add all the values to the $selector-fields array, running the query gives me SelectorError.INVALID_FIELD_NAME errors for the following: CpcBidSource CpmBidSource ExperimentRowStatus PageOnePromotedBidCeiling PageOnePromotedBidChangesForRaisesOnly PageOnePromotedBidModifier PageOnePromotedRaiseBidWhenBudgetConstained PageOnePromotedRaiseBidWhenLowQualityScore PageOnePromotedStrategyGoal PercentCpaBidSource PricingMode TargetSpendBidCeiling TargetSpendSpendTarget Why am I not able to query these values? On a related note, is it possible to query all values without having to specify each one in the array? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
GetRefreshToken.php Error: disabled_client The OAuth client was disabled.
I am building a simple web app to connect to our Adwords MMC and spit out some reports. In the Google API Console I created a new Client ID. I chose Installed Application even though this is a web-based PHP tool I'm making. This page: https://developers.google.com/adwords/api/docs/guides/authentication#access_and_refresh_token says to choose Installed Application if: - You are just getting started for the first time. - You want to test our example code and get started quickly. - You are managing all of your AdWords accounts using a single top level MCC. All of which apply to us. Also, the auth.ini says: ; If you do not have a client ID or secret, please create one of type ; installed application in the Google API console: ; https://cloud.google.com/console So anyways, I created an installed application client ID. I get my Client ID and Client Secret. I add these to auth.ini along with my Adwords API Key (which is approved) and a unique userAgentID string to identify my application. At the command line I run the GetRefreshToken.php script, giving me: Log in to your AdWords account and open the following URL: https://accounts.google.com/o/oauth2/auth?response_type=codeclient_id=5XXleusercontent.comredirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoobscope=https%3A%2F%2Fadwords.google.com%2Fapi%2Fadwords%2Faccess_type=offline After approving the token enter the authorization code here: I log into my Adwords account and then paste in the above URL. I get this page: http://imgur.com/vcilAXI.jpg (I added the black box to the pic to hide my client_id) So what am I doing wrong here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
PHP API GetRefreshToken.php Error: disabled_client The OAuth client was disabled.
I am building a simple web app to connect to our Adwords MMC and spit out some reports. In the Google API Console I created a new (Installed Application) Client ID. I chose Installed Application even though this is a web-based PHP tool I'm making. This page: https://developers.google.com/adwords/api/docs/guides/authentication#access_and_refresh_token says to choose Installed Application if: - You are just getting started for the first time. - You want to test our example code and get started quickly. - You are managing all of your AdWords accounts using a single top level MCC. All of which apply to us. Also, the auth.ini says: ; If you do not have a client ID or secret, please create one of type ; installed application in the Google API console: ; https://cloud.google.com/console So anyways, I created an installed application client ID. I get my Client ID and Client Secret. I add these to auth.ini along with my Adwords API Key (which is approved) and a unique userAgentID string to identify my application. At the command line I run the GetRefreshToken.php script, giving me: Log in to your AdWords account and open the following URL: https://accounts.google.com/o/oauth2/auth?response_type=codeclient_id=5XXleusercontent.comredirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoobscope=https%3A%2F%2Fadwords.google.com%2Fapi%2Fadwords%2Faccess_type=offline After approving the token enter the authorization code here: I log into my Adwords account and then paste in the above URL. I get this page: http://imgur.com/vcilAXI.jpg So what am I doing wrong here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
GetRefreshToken.php Error: disabled_client The OAuth client was disabled.
I am building a simple web app to connect to our Adwords MMC and spit out some reports. In the Google API Console I created a new Client ID. I chose Installed Application even though this is a web-based PHP tool I'm making. This page: https://developers.google.com/adwords/api/docs/guides/authentication#access_and_refresh_token says to choose Installed Application if: - You are just getting started for the first time. - You want to test our example code and get started quickly. - You are managing all of your AdWords accounts using a single top level MCC. All of which apply to us. Also, the auth.ini says: ; If you do not have a client ID or secret, please create one of type ; installed application in the Google API console: ; https://cloud.google.com/console So anyways, I created an installed application client ID. I get my Client ID and Client Secret. I add these to auth.ini along with my Adwords API Key (which is approved) and a unique userAgentID string to identify my application. At the command line I run the GetRefreshToken.php script, giving me: Log in to your AdWords account and open the following URL: https://accounts.google.com/o/oauth2/auth?response_type=codeclient_id=5XXleusercontent.comredirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoobscope=https%3A%2F%2Fadwords.google.com%2Fapi%2Fadwords%2Faccess_type=offline After approving the token enter the authorization code here: I log into my Adwords account and then paste in the above URL. I get this page: http://imgur.com/vcilAXI.jpg So what am I doing wrong here? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.