Is there any alternate option to make report without validating or scheduling

21 views
Skip to first unread message

ipsita rout

unread,
Jan 24, 2010, 8:22:27 AM1/24/10
to AdWords API Forum
Hi to those who are going to help me
My client has the MCC registered A/C and wants to see the records of
all his clients by dynamically choosing the options.Again he needs an
interface where multiple select options ,each belong to multiple
aggregation type and multiple reports type.
For example
he through the interface he'll select lets say "Account" type ,then
select 5 to 6 options from each of the aggregation types [here his
report belongs to more than one aggregation types and each aggregation
type has more than one options]
then he select "Campaign" and same thing
then he select something out of other report tupe and then he runs the
report.
I can do it by validating and then scheduling that report and finally
making the downloding the XML file.
But in this process my client has to afford so many API units.Is there
any shortcut method or any other alternatives of schedule report
option to make it economic.
Plz reply

AdWords API Advisor

unread,
Jan 25, 2010, 10:37:54 AM1/25/10
to AdWords API Forum
Hi,

Unfortunately there is no way to run reports through the API without
using the ReportService.scheduleReportJob() method. Because
misconfigured reports are still charged at full price it is wise to
run ReportService.validateReportJob() first to ensure it is a valid
report. There is no way to avoid spending these API units.

Best,
- Eric Koleda, AdWords API Team

ipsita rout

unread,
Jan 25, 2010, 11:35:06 AM1/25/10
to AdWords API Forum
In specific I want to avoid scheduling a validate report .Because for
validating a report it take 1 API unit, while after validate the
report when I have to schedule it,it take 500 API units.Is there any
alternate option of schedule report so that it'll be economic?

On Jan 25, 8:37 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:

Reed

unread,
Jan 25, 2010, 11:47:15 AM1/25/10
to AdWords API Forum
Given that there are a limited number of aggregation levels available
for reporting, one alternative would be to use the GUI to schedule a
daily report for each aggregation level of the previous day's data and
have that report automatically emailed to you. Then all you have to
do is to process the incoming data files (which are CSV btw, so they
process a lot faster than the XML reports from the API), and store the
data. When your client does his queries and selects his options, you
don't have to get the data from Google - you just query your local
database. The cost is zero because there are no API calls. This also
solves the ongoing problem of not knowing when it is safe to pull the
previous day's data from Google via the API, since the report is a
push report and Google is determining when to send it to you.

ipsita rout

unread,
Jan 25, 2010, 12:59:23 PM1/25/10
to AdWords API Forum
Thanks a lot for this solution .Let's pause this problem here.But
we'll shortly resume that ,after I talk to my client.
But Reed,I need to clear one other problem
My code is

$email = "MCC a/c email";
$password = "MCC a/c pwd";
$useragent = "Ipsita Test Sample";
$applicationToken = "app token";//Ignored in Sandbox
$account_type = "GOOGLE";
$service = "adwords";
$clientEmail = "$email";
$namespace = 'https://adwords.google.com/api/adwords/v13';
$developerToken = 'dev token';

$clientEmails =
array("array of emails get through
$account_service = SoapClientFactory::GetClient($namespace . '/
AccountService?wsdl', 'wsdl');
$account_service->setHeaders($headers);
$debug = 0;

//$login_emails = $account_service->call('getClientAccounts');
//$login_emails = $login_emails['getClientAccountsReturn'];

$login_emails = $account_service->call('getClientAccountInfos');
$login_emails = $login_emails['getClientAccountInfosReturn'];
");
$clientEmailsXml = '';
foreach($clientEmails as $clientEmail) {
$clientEmailsXml .=
"<clientEmails>" . trim($clientEmail) . "</clientEmails>";
}

# Define SOAP headers.
$headers =
'<email>'.$email.'</email>'.
'<password>'.$password.'</password>'.
'<useragent>'.$useragent.'</useragent>'.
'<developerToken>'.$developerToken.'</developerToken>'.
'<applicationToken>'.$applicationToken.'</applicationToken>';

$report_service = SoapClientFactory::GetClient($namespace . '/
ReportService?wsdl', 'wsdl');
$report_service->setHeaders($headers);
$report_job =
'<selectedReportType>Campaign</selectedReportType>'.
'<name>Sample Keyword Report</name>'.
'<crossClient>true</crossClient>'.
$clientEmailsXml.
'<aggregationTypes>Daily</aggregationTypes>'.
'<adWordsType>ContentOnly</adWordsType>'.
'<keywordType>Broad</keywordType>'.
'<startDay>2004-06-20</startDay>'.
'<endDay>2037-12-30</endDay>'.
'<selectedColumns>Impressions</selectedColumns>'.
'<selectedColumns>Clicks</selectedColumns>'.
'<selectedColumns>CTR</selectedColumns>'.
'<selectedColumns>CPC</selectedColumns>';
$request_xml =
'<validateReportJob>'.
'<job xmlns:impl="https://adwords.google.com/api/adwords/v13" '.
'xsi:type="impl:DefinedReportJob">'.$report_job.'</job>'.
'</validateReportJob>';

# Validate report.
$report_service->call('validateReportJob', $request_xml);
print '<pre>';print_r($report_service);exit;

In the response array one statement i got
[document] =>
soapenv:Server.userException

One or more report job parameters is invalid.

30

One or more report job parameters is invalid.

The following columns are not supported by the Report Type
Campaign : [KeywordTypeDisplay]

When I changed $clientEmailsXml. to
'<clientEmails></clientEmails>'.
in the above code I got

[document] =>

soapenv:Server.userException

Either this object does not exist, or this user does not have
permission to access it.
4
Either this object does not exist, or this user does not have
permission to access it.

Can u plz tell me where I am wrong?

ipsita rout

unread,
Jan 26, 2010, 5:09:43 AM1/26/10
to AdWords API Forum

On Jan 25, 8:37 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:

AdWords API Advisor

unread,
Jan 26, 2010, 10:20:27 AM1/26/10
to AdWords API Forum
Hi,

Can you explain what you are trying to accomplish with this code?
What are your goals, and what is failing?

Best,
- Eric

ipsita rout

unread,
Jan 29, 2010, 8:37:34 AM1/29/10
to AdWords API Forum
Hi Eric,
I got the solution of my previous problem.But if u want me briefly
explain the problem I was facing and how I solved that ,then I must
explain,so that others who are facing will be benefited.But apart from
that I just want to know that ,can I make report using more than one
aggregation type?
I mean,
as like I can get report for more than one clients of an MCC
registered A/c by using <clientEmails></clientEmails> in $report_job ,
again as like I can get report for more than one options by using
<selectedColumns></selectedColumns> in $report_job
Exactly as above..........can I get report for more than one
aggregation type ?
I can do it by run it through a loop.But it'll give as many reports as
the number of aggregation types are there.
But I need everything in one report.
Like in <selectedColumns></selectedColumns> or <clientEmails></
clientEmails>, we don't need to run reports separately for each
client's email or for each options.
So is there ant tags or any other option to run the report once for
more than one aggregation type?
Please reply


On Jan 26, 8:20 pm, AdWords API Advisor <adwordsapiadvi...@google.com>

AdWords API Advisor

unread,
Jan 29, 2010, 11:45:53 AM1/29/10
to AdWords API Forum
Hi,

Only certain types report multiple aggregation types, but those are
used to drill down and limit the results, not include multiple kinds
of data. For example, the Search Query Performance Report uses two
aggregation values ("Account, Daily", "Campaign, Weekly", etc):

http://code.google.com/apis/adwords/docs/developer/adwords_api_report_query.html

Unless the aggregations are listed with commas then only one
aggregation is support per report job.

Best,
- Eric Koleda, AdWords API Team

Reply all
Reply to author
Forward
0 new messages