Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-12-16 Thread iateadonut
here's php code that will fetch reports for multiple clients, if you
have a lot of them (10 at a time):

?php

error_reporting(E_STRICT | E_ALL);

// You can set the include path to src directory or reference
// AdWordsUser.php directly via require_once.
// $path = '/path/to/aw_api_php_lib/src';
include('../definedb.php'); //sets $adwordsAPIpath, which i keep
outside webroot on the server
include('./accountsArray.php'); //sets $adwordsAPIpath, uses $selector
= new ServicedAccountSelector(); to make an array of all accounts

$path = $adwordsAPIpath.'/../../live_api2/src/';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
require_once 'Google/Api/Ads/AdWords/Util/ReportUtils.php';

  // Get AdWordsUser from credentials in ../auth.ini
  // relative to the AdWordsUser.php file's directory.
  $user = new AdWordsUser();
$user-GetAuthToken(); //get the token now; this should force 
php
not to fetch the token for each fork()

  // Log SOAP XML request and response.
  $user-LogDefaults();

  // Load ReportDefinitionService so that the required classes are
available.
  $user-LoadService('ReportDefinitionService', 'v201109');

  // Create selector.
  $selector = new Selector();
$selector-fields = array('ExternalCustomerId',
'AccountDescriptiveName', 'PrimaryUserLogin', 'Date', 'Id', 'Name',
'Impressions', 'Clicks', 'Cost');
  //$selector-predicates[] =
  //new Predicate('Status', 'IN', array('ENABLED', 'PAUSED'));

  // Create report definition.
  $reportDefinition = new ReportDefinition();
  $reportDefinition-selector = $selector;
  $reportDefinition-reportName = 'Campaign performance report #' .
time();
  $reportDefinition-dateRangeType = 'LAST_7_DAYS';
  $reportDefinition-reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
  $reportDefinition-downloadFormat = 'CSV';
  $reportDefinition-includeZeroImpressions = FALSE;

  $options = array('version' = 'v201109', 'returnMoneyInMicros' =
FALSE);

$pids = array();

$j = 0;

for ($i=0; $icount($accountsArray); $i++) {

if($j==10) { echo $j. ---\n; $j=0; }

$pids[$i] = pcntl_fork();

  if(!$pids[$i]) {

// child process

try {
  // Get AdWordsUser from credentials in ../auth.ini
  // relative to the AdWordsUser.php file's directory.

$customerId = $accountsArray[$i];

$user-SetClientId($customerId);

$fileName = 7days-.$customerId..csv;
$path = dirname(__FILE__) . '/../reports/7days/' . $fileName;

  ReportUtils::DownloadReport($reportDefinition, $path, $user,
$options);

  printf(Report with name '%s' was downloaded to '%s'.\n,
  $reportDefinition-reportName, $fileName);

  } catch (Exception $e) {
  print $e-getMessage();
}

exit();
  }

$j++;

}


On Nov 17, 6:20 pm, Eric Koleda eric.kol...@google.com wrote:
 Hi,

 Creating and using existing report definitions will be supported at least
 until the sunset of v201101, which is scheduled for late February 2012.  By
 that time you will need to have moved your reporting to ad-hoc reports.

 Best,
 - Eric Koleda, AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-11-17 Thread iateadonut
Kevin,

How long will we be able to use our old report definitions?  Will
ReportUtils::DownloadReport based on a reportDefinitionId be
deprecated soon, too?

Will we not be able to create a new report definition sometime in the
near future?  Will the ones that already exist be eliminated?  When?


On Nov 4, 1:57 pm, Kevin Winter kevin.win...@google.com wrote:
 Hi,
   @iateadonut, this is unsupported and will be going away.  We strongly
 encourage everyone to migrate to v201109 AdHoc 
 reports:http://code.google.com/apis/adwords/docs/reportingtopics.html#adhoc

 @Andreas, Yes, this is the recommended approach.  Please see this blog post
 for more 
 info:http://adwordsapi.blogspot.com/2011/10/downloading-reports-for-lots-o...

 - Kevin Winter
 AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-11-17 Thread Eric Koleda
Hi,

Creating and using existing report definitions will be supported at least 
until the sunset of v201101, which is scheduled for late February 2012.  By 
that time you will need to have moved your reporting to ad-hoc reports.

Best,
- Eric Koleda, AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-11-04 Thread iateadonut


You can get a report for all clients.

The php in the first post is wrong.  Where it says:
  $user = new AdWordsUser();
  $user-SetClientId(eigene ID);
  $user-LogDefaults();

Escape out the second line:
  $user = new AdWordsUser();
  //$user-SetClientId(eigene ID);
  $user-LogDefaults();
and the report will be generated for all clients that you have access
to.


Also, if you want to actually KNOW which account each keyword belongs
to (or adGroup, whatever kind of report you're running):
$selector-fields = array('AdGroupId', 'Id', 'KeywordText',
  'KeywordMatchType', 'Impressions', 'Clicks', 'Cost');
You should add 'ExternalCustomerId' as a selector.


Please reference 'AddCrossClientReportDefinition.php' in your examples
folder.
That script will return $reportDefinition-id - you need to use that
id in another script:
DownloadCrossClientReport.php

which will have the line:
$reportDefinitionId = (float) '';

Just add your $reportDefinition-id there and you should be able to
download it.



The following is a script that works for adding a cross-client report
definition.  I've left all my notes in (there are WAY too many fields
in the selector - you probably don't want all those.  If you need to
find all the options for a report, use 'GetReportFields.php'), so
you'll have to modify the file for it to work:

try {
  // Get AdWordsUser from credentials in ../auth.ini
  // relative to the AdWordsUser.php file's directory.
  $user = new AdWordsUser();

  // Log SOAP XML request and response.
  $user-LogDefaults();

  // Get the GetReportDefinitionService.
  $reportDefinitionService = $user-
GetReportDefinitionService('v201101');

  // Create selector.
  $selector = new Selector();

//$selector-fields = array('ExternalCustomerId',
'AccountDescriptiveName', 'PrimaryUserLogin', 'Date',
'AdNetworkType2', 'ValuePerConversion', 'AveragePosition',
'AverageCpc', 'AverageCpm', 'Ctr', 'CampaignName', 'CampaignId',
'Status', 'Clicks', 'AccountTimeZoneId', 'ConversionRate',
'Conversions', 'Cost', 'CostPerConversion',
'CostPerConversionManyPerClick', 'DerivedDailyBudget', 'Impressions',
'InvalidClicks', 'InvalidClickRate', 'TotalConvValue',
'ConversionsManyPerClick', 'ExactMatchImpressionShare',
'ImpressionShare', 'BudgetLostImpressionShare',
'QualityLostImpressionShare'); //fields for cross-client campaign
performance report

$selector-fields = array('AdGroupId', 'AdGroupName',
'AdNetworkType1', 'AdNetworkType2', 'AverageCpc', 'AverageCpm',
'AveragePosition',  'CampaignId', 'CampaignStatus', 'Clicks',
'ConversionOptimizerBidType', 'ConversionRate',
'ConversionRateManyPerClick', 'Conversions',
'ConversionsManyPerClick', 'ConversionValue', 'Cost',
'CostPerConversion', 'CostPerConversionManyPerClick', 'Ctr', 'Date',
'DeduplicationMode', 'EnhancedCpcEnabled', 'ExternalCustomerId', 'Id',
'Impressions', 'KeywordContentMaxCpc', 'KeywordMaxCpc', 'MaxCpm',
'PercentCpa', 'ProxyKeywordMaxCpc', 'ProxySiteMaxCpc', 'SiteMaxCpc',
'Slot', 'Status', 'TargetCpa', 'TotalConvValue', 'ValuePerConv',
'ValuePerConversion', 'ValuePerConversionManyPerClick',
'ValuePerConvManyPerClick', 'ViewThroughConversions'); //adGroup
report

$selector-fields = array('Date', 'ExternalCustomerId', 'Id',
'CampaignId', 'AdGroupId', 'Status', 'KeywordText', 'AdNetworkType2',
'Impressions', 'Clicks', 'ConversionRate', 'Conversions', 'Cost',
'CostPerConversion', 'AverageCpc', 'AverageCpm', 'AveragePosition'); //
keword report

  // Create report definition.
  $reportDefinition = new ReportDefinition();
  $reportDefinition-reportName = 'whatever'; //. uniqid();

  $reportDefinition-dateRangeType = 'CUSTOM_DATE';
  $reportDefinition-dateRangeType = 'YESTERDAY';
  //$selector-dateRange = new DateRange('20110101','20111012');
  //$reportDefinition-dateRangeType = 'THIS_MONTH';
  $reportDefinition-reportType = 'KEYWORDS_PERFORMANCE_REPORT';
  //$reportDefinition-reportType = 'ADGROUP_PERFORMANCE_REPORT';
  //$reportDefinition-reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
  //$reportDefinition-reportType = 'ACCOUNT_PERFORMANCE_REPORT';
  $reportDefinition-downloadFormat = 'CSV';
  $reportDefinition-selector = $selector;
  $reportDefinition-crossClient = TRUE;

  // Create operations.
  $operation = new ReportDefinitionOperation();
  $operation-operand = $reportDefinition;
  $operation-operator = 'ADD';

  $operations = array($operation);

  // Add report definition.
  $result = $reportDefinitionService-mutate($operations);

  // Display report definitions.
  if ($result != null) {
foreach ($result as $reportDefinition) {
  printf(Report definition with name '%s' and id '%s' was added.
\n,
  $reportDefinition-reportName, $reportDefinition-id);
}
  } else {
print No report definitions were added.\n;
  }
} catch (Exception $e) {
  print $e-getMessage();
}


On Nov 3, 7:47 am, scrat weigel.andr...@googlemail.com wrote:
 Is it now possible to run report on behalf of a mcc account using
 Adhoc Reports?

 I also couldn't 

Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-11-04 Thread Kevin Winter
Hi,
  @iateadonut, this is unsupported and will be going away.  We strongly 
encourage everyone to migrate to v201109 AdHoc reports: 
http://code.google.com/apis/adwords/docs/reportingtopics.html#adhoc

@Andreas, Yes, this is the recommended approach.  Please see this blog post 
for more info:
http://adwordsapi.blogspot.com/2011/10/downloading-reports-for-lots-of-client.html

- Kevin Winter
AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-11-04 Thread scrat
Now i'm getting the client reports with the ad hoc report download. It
works fine.

Thanks for the feedback.

Andreas

On Nov 4, 7:57 pm, Kevin Winter kevin.win...@google.com wrote:
 Hi,
   @iateadonut, this is unsupported and will be going away.  We strongly
 encourage everyone to migrate to v201109 AdHoc 
 reports:http://code.google.com/apis/adwords/docs/reportingtopics.html#adhoc

 @Andreas, Yes, this is the recommended approach.  Please see this blog post
 for more 
 info:http://adwordsapi.blogspot.com/2011/10/downloading-reports-for-lots-o...

 - Kevin Winter
 AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-11-03 Thread scrat
Is it now possible to run report on behalf of a mcc account using
Adhoc Reports?

I also couldn't download a predefined report of a mcc report using
DownloadReport function of the ReportUtils

Following Error occured:
Improperly formatted report request


So the only way to get reports of all clients of a mcc accoutn is to
walk through all clients and download a separat adhoc report!?

Best regards
Andreas

On 27 Sep., 22:02, Eric Koleda eric.kol...@google.com wrote:
 Hi Ezequiel,

 Can you double-check that the Customer ID in the clientCustomerId header
 corresponds to a regular ad-serving account instead of an MCC account?

 Best,
 - Eric Koleda, AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-09-27 Thread Eric Koleda
Hi Ezequiel,

Can you double-check that the Customer ID in the clientCustomerId header 
corresponds to a regular ad-serving account instead of an MCC account?

Best,
- Eric Koleda, AdWords API Team

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-07 Thread Chirag eBrandz
Yes, On behalf of MCC account.

On Jul 6, 7:44 pm, Stefan Podkowinski s.podkowin...@gmail.com wrote:
 Are you trying to create the report on behalf of a MCC account?

 On 6 Jul., 16:18, Chirag eBrandz chirag.ebra...@gmail.com wrote:







  Hi,

  I am also getting same error
  [ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @
  operations].
  Can you help me out what i am doing wrong?
  If you find the solution can you help me out.

  Thanks,
  chirag

  On May 9, 4:41 pm, tfren...@internet-mit-iq.de tfren...@internet-

  mit-iq.de wrote:
   Hi,

   so, i use the newest 
   google-api-adwords-phphttp://code.google.com/p/google-api-adwords-php/
   .
   Unfortunately I get this error every report type:
   [@ ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH operations]

   And so no reports.

   The API that I use is the version 201,101th

   My goal is really to create custom reports with cross-client, so I 
   thought I
   start first with the existing report types of project before I approached 
   the
   heavy trust me.
   Unfortunately, I do not get this out already.

   Here one has an idea?

   ---
   Leider erhalte ich bei jedem reporttyp diesen fehler:
   [ReportDefinitionError.
   CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

   Und damit keine Reporte.

   Die Api die ich nutze ist die Version 201101.

   Mein Ziel ist es eigentlich individuelle Berichte mit crossclient zu
   erstellen, daher dachte ich, ich beginne ersteinmal mit den bestehenden
   reporttypen bevor ich mich an das schwere projekt heran traue.
   Leider bekomme ich dies schon nicht hin.

   Hat hier einer eine eine Idee?
   ---

   [code]
   error_reporting(E_STRICT | E_ALL);

   // You can set the include path to src directory or reference
   // AdWordsUser.php directly via require_once.
   // $path = '/path/to/aw_api_php_lib/src';
   $path = dirname(__FILE__) . '/../../src';
   set_include_path(get_include_path() . PATH_SEPARATOR . $path);

   require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
   require_once 'Google/Api/Ads/AdWords/Util/ReportUtils.php';
   require_once
   'Google/Api/Ads/AdWords/v201101/cm/ReportDefinitionService.php';
   require_once 'Google/Api/Ads/AdWords/v201101/cm/CampaignService.php';
   require_once 'Google/Api/Ads/AdWords/Util/ReportDownloadException.php';

   try {
     // Get AdWordsUser from credentials in ../auth.ini
     // relative to the AdWordsUser.php file's directory.

       $sfileName = test.csv;

         $user = new AdWordsUser();
         $user-SetClientId(eigene ID);
       $user-LogDefaults();

       $reportDefinitionService = 
   $user-GetReportDefinitionService('v201101');
         $servicedAccountService =
   $user-GetServicedAccountService(v201101);    

         // Create selector.
         $selector = new Selector();
         $selector-fields = array('AdGroupId', 'Id', 'KeywordText',
         'KeywordMatchType', 'Impressions', 'Clicks', 'Cost');
         $selector-dateRange = new DateRange(20100101, 20110509);

         $reportDefinition = new ReportDefinition();
         $reportDefinition-reportName = 'Keywords performance report #' .
   time();
         $reportDefinition-dateRangeType = 'CUSTOM_DATE';
         $reportDefinition-reportType = 'KEYWORDS_PERFORMANCE_REPORT';
         $reportDefinition-downloadFormat = 'CSVFOREXCEL';
         $reportDefinition-selector = $selector;

       // Create operations.
         $operation = new ReportDefinitionOperation();
         $operation-operand = $reportDefinition;
         $operation-operator = 'ADD';

         $operations = array($operation);

        // Add report definition.
        $result = $reportDefinitionService-mutate($operations);

        $path = dirname(__FILE__) . '/' . $sfileName;

        for($x = 0; $x  count($result); $x++ ){                        
           #$reportDefintionId, $path = NULL,AdWordsUser $user, $server = 
   NULL,
   $returnMoneyInMicros = NULL
           ReportUtils::DownloadReport($result[$x]-id, $path, $user, null,
   true);                        
        }

        printf(Report with definition id '%s' was downloaded to '%s'.\n,
           $reportDefinitionId, $sfileName);} catch (Exception $e) {

     print $e-getMessage();}

   [/code]

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-07 Thread Danial Klimkin
Hello Chirag,


I got your log file. The issue is you are trying to run the report on the 
MCC account. Currently cross-client reports for v201101 are not supported so 
you need to specify which client you want the report for.

You can use clientCustomerId (recommended) or clientEmail header for it. For 
more details please refer to:

  http://code.google.com/apis/adwords/docs/headers.html


-Danial, AdWords API Team.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-07 Thread Chirag eBrandz
Hi Danial,
I had sent you mail for XML code for the request and response.

Thanks,
chirag

On Jul 6, 7:34 pm, Danial Klimkin danial.klimkin
%google@gtempaccount.com wrote:
 Hello Chirag,

 I never received any logs unfortunately and it is hard to say without
 knowing what report you are running and what kind of account you have.

 Please send me full XML code of your request and response you get back
 from server.

 -Danial, AdWords API Team.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-07 Thread Chirag eBrandz
Thanks,
Report created after passing customerId under soap header.
Please update us when cross-client reports for v201101 supported.

On Jul 7, 3:28 pm, Chirag eBrandz chirag.ebra...@gmail.com wrote:
 Hi Danial,
 I had sent you mail for XML code for the request and response.

 Thanks,
 chirag

 On Jul 6, 7:34 pm, Danial Klimkin danial.klimkin







 %google@gtempaccount.com wrote:
  Hello Chirag,

  I never received any logs unfortunately and it is hard to say without
  knowing what report you are running and what kind of account you have.

  Please send me full XML code of your request and response you get back
  from server.

  -Danial, AdWords API Team.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Aw: Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-07 Thread Stefan Podkowinski
You cannot run reports for MCCs. You need to specify the client Id of a 
regular account that can run campaigns for that. 

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-06 Thread Chirag eBrandz
Hi,

I am also getting same error
[ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @
operations].
Can you help me out what i am doing wrong?
If you find the solution can you help me out.

Thanks,
chirag

On May 9, 4:41 pm, tfren...@internet-mit-iq.de tfren...@internet-
mit-iq.de wrote:
 Hi,

 so, i use the newest 
 google-api-adwords-phphttp://code.google.com/p/google-api-adwords-php/
 .
 Unfortunately I get this error every report type:
 [@ ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH operations]

 And so no reports.

 The API that I use is the version 201,101th

 My goal is really to create custom reports with cross-client, so I thought I
 start first with the existing report types of project before I approached the
 heavy trust me.
 Unfortunately, I do not get this out already.

 Here one has an idea?

 ---
 Leider erhalte ich bei jedem reporttyp diesen fehler:
 [ReportDefinitionError.
 CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

 Und damit keine Reporte.

 Die Api die ich nutze ist die Version 201101.

 Mein Ziel ist es eigentlich individuelle Berichte mit crossclient zu
 erstellen, daher dachte ich, ich beginne ersteinmal mit den bestehenden
 reporttypen bevor ich mich an das schwere projekt heran traue.
 Leider bekomme ich dies schon nicht hin.

 Hat hier einer eine eine Idee?
 ---

 [code]
 error_reporting(E_STRICT | E_ALL);

 // You can set the include path to src directory or reference
 // AdWordsUser.php directly via require_once.
 // $path = '/path/to/aw_api_php_lib/src';
 $path = dirname(__FILE__) . '/../../src';
 set_include_path(get_include_path() . PATH_SEPARATOR . $path);

 require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
 require_once 'Google/Api/Ads/AdWords/Util/ReportUtils.php';
 require_once
 'Google/Api/Ads/AdWords/v201101/cm/ReportDefinitionService.php';
 require_once 'Google/Api/Ads/AdWords/v201101/cm/CampaignService.php';
 require_once 'Google/Api/Ads/AdWords/Util/ReportDownloadException.php';

 try {
   // Get AdWordsUser from credentials in ../auth.ini
   // relative to the AdWordsUser.php file's directory.

     $sfileName = test.csv;

       $user = new AdWordsUser();
       $user-SetClientId(eigene ID);
     $user-LogDefaults();

     $reportDefinitionService = $user-GetReportDefinitionService('v201101');
       $servicedAccountService =
 $user-GetServicedAccountService(v201101);    

       // Create selector.
       $selector = new Selector();
       $selector-fields = array('AdGroupId', 'Id', 'KeywordText',
       'KeywordMatchType', 'Impressions', 'Clicks', 'Cost');
       $selector-dateRange = new DateRange(20100101, 20110509);

       $reportDefinition = new ReportDefinition();
       $reportDefinition-reportName = 'Keywords performance report #' .
 time();
       $reportDefinition-dateRangeType = 'CUSTOM_DATE';
       $reportDefinition-reportType = 'KEYWORDS_PERFORMANCE_REPORT';
       $reportDefinition-downloadFormat = 'CSVFOREXCEL';
       $reportDefinition-selector = $selector;

     // Create operations.
       $operation = new ReportDefinitionOperation();
       $operation-operand = $reportDefinition;
       $operation-operator = 'ADD';

       $operations = array($operation);

      // Add report definition.
      $result = $reportDefinitionService-mutate($operations);

      $path = dirname(__FILE__) . '/' . $sfileName;

      for($x = 0; $x  count($result); $x++ ){                        
         #$reportDefintionId, $path = NULL,AdWordsUser $user, $server = NULL,
 $returnMoneyInMicros = NULL
         ReportUtils::DownloadReport($result[$x]-id, $path, $user, null,
 true);                        
      }

      printf(Report with definition id '%s' was downloaded to '%s'.\n,
         $reportDefinitionId, $sfileName);} catch (Exception $e) {

   print $e-getMessage();}

 [/code]

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-06 Thread Danial Klimkin
Hello Chirag,


I never received any logs unfortunately and it is hard to say without
knowing what report you are running and what kind of account you have.

Please send me full XML code of your request and response you get back
from server.


-Danial, AdWords API Team.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-07-06 Thread Stefan Podkowinski

Are you trying to create the report on behalf of a MCC account?

On 6 Jul., 16:18, Chirag eBrandz chirag.ebra...@gmail.com wrote:
 Hi,

 I am also getting same error
 [ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @
 operations].
 Can you help me out what i am doing wrong?
 If you find the solution can you help me out.

 Thanks,
 chirag

 On May 9, 4:41 pm, tfren...@internet-mit-iq.de tfren...@internet-



 mit-iq.de wrote:
  Hi,

  so, i use the newest 
  google-api-adwords-phphttp://code.google.com/p/google-api-adwords-php/
  .
  Unfortunately I get this error every report type:
  [@ ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH operations]

  And so no reports.

  The API that I use is the version 201,101th

  My goal is really to create custom reports with cross-client, so I thought I
  start first with the existing report types of project before I approached 
  the
  heavy trust me.
  Unfortunately, I do not get this out already.

  Here one has an idea?

  ---
  Leider erhalte ich bei jedem reporttyp diesen fehler:
  [ReportDefinitionError.
  CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

  Und damit keine Reporte.

  Die Api die ich nutze ist die Version 201101.

  Mein Ziel ist es eigentlich individuelle Berichte mit crossclient zu
  erstellen, daher dachte ich, ich beginne ersteinmal mit den bestehenden
  reporttypen bevor ich mich an das schwere projekt heran traue.
  Leider bekomme ich dies schon nicht hin.

  Hat hier einer eine eine Idee?
  ---

  [code]
  error_reporting(E_STRICT | E_ALL);

  // You can set the include path to src directory or reference
  // AdWordsUser.php directly via require_once.
  // $path = '/path/to/aw_api_php_lib/src';
  $path = dirname(__FILE__) . '/../../src';
  set_include_path(get_include_path() . PATH_SEPARATOR . $path);

  require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
  require_once 'Google/Api/Ads/AdWords/Util/ReportUtils.php';
  require_once
  'Google/Api/Ads/AdWords/v201101/cm/ReportDefinitionService.php';
  require_once 'Google/Api/Ads/AdWords/v201101/cm/CampaignService.php';
  require_once 'Google/Api/Ads/AdWords/Util/ReportDownloadException.php';

  try {
    // Get AdWordsUser from credentials in ../auth.ini
    // relative to the AdWordsUser.php file's directory.

      $sfileName = test.csv;

        $user = new AdWordsUser();
        $user-SetClientId(eigene ID);
      $user-LogDefaults();

      $reportDefinitionService = $user-GetReportDefinitionService('v201101');
        $servicedAccountService =
  $user-GetServicedAccountService(v201101);    

        // Create selector.
        $selector = new Selector();
        $selector-fields = array('AdGroupId', 'Id', 'KeywordText',
        'KeywordMatchType', 'Impressions', 'Clicks', 'Cost');
        $selector-dateRange = new DateRange(20100101, 20110509);

        $reportDefinition = new ReportDefinition();
        $reportDefinition-reportName = 'Keywords performance report #' .
  time();
        $reportDefinition-dateRangeType = 'CUSTOM_DATE';
        $reportDefinition-reportType = 'KEYWORDS_PERFORMANCE_REPORT';
        $reportDefinition-downloadFormat = 'CSVFOREXCEL';
        $reportDefinition-selector = $selector;

      // Create operations.
        $operation = new ReportDefinitionOperation();
        $operation-operand = $reportDefinition;
        $operation-operator = 'ADD';

        $operations = array($operation);

       // Add report definition.
       $result = $reportDefinitionService-mutate($operations);

       $path = dirname(__FILE__) . '/' . $sfileName;

       for($x = 0; $x  count($result); $x++ ){                        
          #$reportDefintionId, $path = NULL,AdWordsUser $user, $server = NULL,
  $returnMoneyInMicros = NULL
          ReportUtils::DownloadReport($result[$x]-id, $path, $user, null,
  true);                        
       }

       printf(Report with definition id '%s' was downloaded to '%s'.\n,
          $reportDefinitionId, $sfileName);} catch (Exception $e) {

    print $e-getMessage();}

  [/code]

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


Re: [ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-05-11 Thread Danial Klimkin
Hello,


Please send me full XML code for the request and response to 
api.dklim...@gmail.com.


-Danial,
  AdWords API Team.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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


[ReportDefinitionError. CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

2011-05-09 Thread tfren...@internet-mit-iq.de
Hi,

so, i use the newest 
google-api-adwords-phphttp://code.google.com/p/google-api-adwords-php/
.
Unfortunately I get this error every report type:
[@ ReportDefinitionError.CUSTOMER_SERVING_TYPE_REPORT_MISMATCH operations]

And so no reports.

The API that I use is the version 201,101th

My goal is really to create custom reports with cross-client, so I thought I 
start first with the existing report types of project before I approached the 
heavy trust me.
Unfortunately, I do not get this out already.

Here one has an idea?

---
Leider erhalte ich bei jedem reporttyp diesen fehler:
[ReportDefinitionError.
CUSTOMER_SERVING_TYPE_REPORT_MISMATCH @ operations]

Und damit keine Reporte.

Die Api die ich nutze ist die Version 201101.

Mein Ziel ist es eigentlich individuelle Berichte mit crossclient zu 
erstellen, daher dachte ich, ich beginne ersteinmal mit den bestehenden 
reporttypen bevor ich mich an das schwere projekt heran traue.
Leider bekomme ich dies schon nicht hin.

Hat hier einer eine eine Idee?
---


[code]
error_reporting(E_STRICT | E_ALL);

// You can set the include path to src directory or reference
// AdWordsUser.php directly via require_once.
// $path = '/path/to/aw_api_php_lib/src';
$path = dirname(__FILE__) . '/../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
require_once 'Google/Api/Ads/AdWords/Util/ReportUtils.php';
require_once 
'Google/Api/Ads/AdWords/v201101/cm/ReportDefinitionService.php';
require_once 'Google/Api/Ads/AdWords/v201101/cm/CampaignService.php';
require_once 'Google/Api/Ads/AdWords/Util/ReportDownloadException.php';

try {
  // Get AdWordsUser from credentials in ../auth.ini
  // relative to the AdWordsUser.php file's directory.
  
$sfileName = test.csv;

  $user = new AdWordsUser();
  $user-SetClientId(eigene ID);
$user-LogDefaults();

$reportDefinitionService = $user-GetReportDefinitionService('v201101');
  $servicedAccountService = 
$user-GetServicedAccountService(v201101);

   
  // Create selector.
  $selector = new Selector();
  $selector-fields = array('AdGroupId', 'Id', 'KeywordText',
  'KeywordMatchType', 'Impressions', 'Clicks', 'Cost');
  $selector-dateRange = new DateRange(20100101, 20110509);
  
  

  $reportDefinition = new ReportDefinition();
  $reportDefinition-reportName = 'Keywords performance report #' . 
time();
  $reportDefinition-dateRangeType = 'CUSTOM_DATE';
  $reportDefinition-reportType = 'KEYWORDS_PERFORMANCE_REPORT';
  $reportDefinition-downloadFormat = 'CSVFOREXCEL';
  $reportDefinition-selector = $selector;
  
// Create operations.
  $operation = new ReportDefinitionOperation();
  $operation-operand = $reportDefinition;
  $operation-operator = 'ADD';

  $operations = array($operation);

 // Add report definition.
 $result = $reportDefinitionService-mutate($operations);

 $path = dirname(__FILE__) . '/' . $sfileName;

 for($x = 0; $x  count($result); $x++ ){
#$reportDefintionId, $path = NULL,AdWordsUser $user, $server = NULL, 
$returnMoneyInMicros = NULL
ReportUtils::DownloadReport($result[$x]-id, $path, $user, null, 
true);
 }

 printf(Report with definition id '%s' was downloaded to '%s'.\n,
$reportDefinitionId, $sfileName);
} catch (Exception $e) {
  print $e-getMessage();
}
[/code]

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.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 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