CrossClient Report api v201101 - PHP

2011-06-30 Thread Peter Stannett
Cross client reports are not yet available. Check the Adwords blog for more 
details: 
http://adwordsapi.blogspot.com/2011/03/update-to-reporting-service-in-adwords.html

 
 
 i used the aw_api_php_lib_2.5.1.
 
 how i can download a cross client report?
 
 A single report is not a Problem, but crossclient
 
 My Code is:
 [code]
 public function download() {
 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';
 
 //Nur ändern wenn sich mal wieder die Feldbezeichnungen bei Google 
 ändern//
 
 $AD_PERFORMANCE_REPORT = array(
   'Date', 
 #date AD_PERFORMANCE_REPORT
   'AccountDescriptiveName',
 #account AD_PERFORMANCE_REPORT
   'ExternalCustomerId',
 #customerid AD_PERFORMANCE_REPORT
   'AdGroupId',
 #AdGroupIdAD_PERFORMANCE_REPORT
   'AdGroupName',
 #AdGroupNameAD_PERFORMANCE_REPORT
   'Headline',
 #HeadlineAD_PERFORMANCE_REPORT
   'Description1',
 #Description2AD_PERFORMANCE_REPORT
   'Description2',
 #Description2AD_PERFORMANCE_REPORT
   'DisplayUrl',
 #DisplayUrlAD_PERFORMANCE_REPORT
   'CreativeApprovalStatus',
 #CreativeApprovalStatusAD_PERFORMANCE_REPORT
 'AdGroupStatus',
 #AdGroupStatusAD_PERFORMANCE_REPORT
 'Url',
 #UrlAD_PERFORMANCE_REPORT
 'CampaignStatus',
 #CampaignStatusAD_PERFORMANCE_REPORT
 'Impressions',
 #ImpressionsAD_PERFORMANCE_REPORT
 'Clicks',
 #ClicksAD_PERFORMANCE_REPORT
 'Cost',   
  #Cost AD_PERFORMANCE_REPORT
 'AveragePosition',
 #AveragePosition  AD_PERFORMANCE_REPORT
 'Conversions',
 #ConversionsAD_PERFORMANCE_REPORT
 'ConversionValue',
 #ConversionValue   AD_PERFORMANCE_REPORT
   'AccountCurrencyCode'
 #AccountCurrencyCodeAD_PERFORMANCE_REPORT
   );
 $CAMPAIGN_PERFORMANCE_REPORT = array(
   'Amount'
 #Budget CAMPAIGN_PERFORMANCE_REPORT
   );
   
 $CREATIVE_CONVERSION_REPORT = array(
   'CreativeId'
 #CreativeIdCREATIVE_CONVERSION_REPORT
   );
   
 //Nur ändern wenn sich mal wieder die Feldbezeichnungen bei Google 
 ändern//
 
 //Da wir nach dem Umstieg von API v13 auf v201101 nicht mehr mit 
 einem Bericht auskommen, müssen wir 3 Berichte ziehen 
   
 $aReportDefinitionFields = 
 array($AD_PERFORMANCE_REPORT,$CAMPAIGN_PERFORMANCE_REPORT,$CREATIVE_CONVERSION_REPORT);
 $aReportDefinitionFieldsDescription = 
 array('AD_PERFORMANCE_REPORT','CAMPAIGN_PERFORMANCE_REPORT','CREATIVE_CONVERSION_REPORT');
   
 $time = time();
 $datum = date(dmYHis,$time); 
 $dirs = $this-conf-parser-directories;
 $newacc = $this-getAccount();

 #
 
 $timer = new Backend_Model_Timer();
 echoTimer wurde gestartet\n;
 
 
 
 
 //nötige Daten aus der 

Aw: i need help 201101 - wdsl

2011-06-30 Thread Peter Stannett
4 months from the date of x-client reports going live. It's on the blog

http://adwordsapi.blogspot.com/2011/05/update-on-adwords-api-v201101-sunset.html



Begin forwarded message:

 From: intswe-goo...@internet-mit-iq.de intswe-goo...@internet-mit-iq.de
 Date: 30 June 2011 09:32:51 GMT+01:00
 To: adwords-api@googlegroups.com
 Subject: Aw: i need help 201101 - wdsl
 Reply-To: intswe-goo...@internet-mit-iq.de
 
 nobody has a clue?
 I need more information than one report per the standard reports give away.
 I would have otherwise always 3 download reports and then add them together.
 
 -- 
 =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 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

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Broad Match Modified Kwords

2011-05-13 Thread Peter Stannett
Hi All 

I have a keyword report running automatically using v201101 and when it 
returns broad match modifieds, the keyword includes a ' mark. So instead of 

+red shoes it shows
'+red shoes

Is there anyway of removing this automatically?

Thanks
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Data for the day before yesterday

2011-05-10 Thread Peter Stannett
Hi all

For some reason Google is not showing conversion data for yesterday for just 
on of my clients, which is odd as it used to. I have an automatically 
produced adgroup performance report for yesterday set up to run which is now 
rendered useless as all the conversions show a big fat 0.

Essentially I want to change the date the api looks at from

  
 // $adGroupId = (float) '';
$startDate = '20110510';
$endDate = '20110510;

to something like this (but not this rubbish)

  
 // $adGroupId = (float) '';
$startDate = $daybeforeyesterday;
$endDate = 'daybeforeyesterday';

I tried defining a variable 

Define $daybeforeyesterday = strtotime (-1 day);
$daybeforeyesterday =  .date(m, Y, $daybeforeyesterday);

but I get an error (Unexpected T_Variable). Can someone inform me how I 
would achieve this? 

Thanks

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Data for the day before yesterday

2011-05-10 Thread Peter Stannett
No you weren't missing something. I am still learning php from the very 
basics and sometimes implementing things like this within code that isn't 
mine sometimes throws me.

Your solution was perfect :)

thanks again

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: IMplementing Ad Parameters

2011-05-05 Thread Peter Stannett
Hi

thanks for the reply. I am still unsure how this would be implemented 
effectively for my client. Effectively if I write the script to set the 
price for blue antique cups to £30 and the amount of stock as 18, and then 
my clients stock changes to £20 and 10 cups, then my advert would be wrong 
as I would have coded it to say £30 and 18. 

I would then have to manually amend the php script, when I might as well 
amend the ads! I was thinking this would automatically set the price and 
quantity available without any manual intervention. However I do not have a 
feed of the prices as such, except for a datafeed that is used for the 
merchant centre.

So I am confused as to how I would actually implement this!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: IMplementing Ad Parameters

2011-05-05 Thread Peter Stannett
Hi thanks for your help.

I understand all that which is one thing! However it sounds like it is out 
of my limited php skill set. One to leave for the future I think,

Thanks again

Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


IMplementing Ad Parameters

2011-05-04 Thread Peter Stannett
Hi all

I wish to implement the ad parameters php page to automatically set the 
prices contained within the ads for my client.

However the example 
on 
http://adwordsapi.blogspot.com/2009/11/discover-v2009-setting-ad-parameters.html
 
shows 1 ad example. My client has 100's of products, all at different 
prices. From the example given and the php code: 


  $adGroupId = (float) 'INSERT_AD_GROUP_ID_HERE';
  $keywordId = (float) 'INSERT_KEYWORD_ID_HERE';

  // Create ad parameters.
  $adParam1 = new AdParam($adGroupId, $keywordId, '100', 1);
  $adParam2 = new AdParam($adGroupId, $keywordId, '$40', 2);


I would have to manually enter each individual adgroupid and keywordId and 
then manually enter the parameters themselves. Clearly this is far too much 
manual work! I clearly am missing something. For example, using the above 
for antique cups, if I wanted to then create dynamic priced ads for blue 
antique cups with parameters '50' and '£20' and then for red antique cups, 
'10' and '£12' how would I implement this?

Essentially my client has lots of products and stock fluctuates day by day. 
I was thinking this would somehow link into the merchant center datafeed. 

I would appreciate any pointers.

Kind regards
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: [SelectorError.INVALID_PREDICATE_VALUE @ serviceSelector; errorDetails:]

2011-04-28 Thread Peter Stannett
HI Kevin

Thanks for the info, though I'm not too sure what you mean?

I apologise but my php knowledge is quite limited at the moment! Could you 
elaborate further? I would appreciate it. 
Thanks
Peter
On 27 Apr 2011, at 15:05, Kevin Winter wrote:

 Hi Peter,
   In the foreach loop over $page-entries you should be able to do an 
 instanceof to verify that the result is a TextAd and then pull out the 
 headline like this: $adGroupAd-ad-headline
 
 -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

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


[SelectorError.INVALID_PREDICATE_VALUE @ serviceSelector; errorDetails:]

2011-04-21 Thread Peter Stannett
HI all

I'm trying to run the GetAllAds.php example in version V201101 and I
get [SelectorError.INVALID_PREDICATE_VALUE @ serviceSelector;
errorDetails:] error

I have $adGroupId=(float) commented out as I want to retrieve all ads.

Can anyone help?

Thanks
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: [SelectorError.INVALID_PREDICATE_VALUE @ serviceSelector; errorDetails:]

2011-04-21 Thread Peter Stannett
It's ok! Everyone sit back down! I realised I had to amend 
$adGroupIdPredicate to lose the array($adgroupId) and change the 
$selector-predicates=array($statusPredicate) and lose the $adGroupId 
variable.

At least, I think that's what I had to do. It's worked anyway!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: [SelectorError.INVALID_PREDICATE_VALUE @ serviceSelector; errorDetails:]

2011-04-21 Thread Peter Stannett
However I am trying to download all the ads into a csv and I am having 
difficulty implementing the report service. Could someone explain firstly 
how I get to print out all the ads onto the screen (at the moment I have 
just Ad with id  etc showing, not the headline etc that I have chosen as 
my selector fields) and secondly how I implement the Add report definition. 

Many thanks
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: [SelectorError.INVALID_PREDICATE_VALUE @ serviceSelector; errorDetails:]

2011-04-21 Thread Peter Stannett

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';


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 AdGroupAdService.
  $adGroupAdService = $user-GetAdGroupAdService('v201101');

//  $adGroupId = (float) '';

  // Create selector.
  $selector = new Selector();
  $selector-fields = array('CampaignName', 'AdGroupName', 'Headline', 
'Description1', 'Description2');
  $selector-ordering = array(new OrderBy('Id', 'ASCENDING'));


  // Amended predicates.
  $adGroupIdPredicate = new Predicate('AdGroupId', 'IN');
  // By default disabled ads aren't returned by the selector. To return them
  // include the DISABLED status in a predicate.
  $statusPredicate =new Predicate('Status', 'IN', array('ENABLED'));
  
  //Amended Line
  $selector-predicates = array($statusPredicate);

  // Get all ads.
  $page = $adGroupAdService-get($selector);

  // Display ads.
  if (isset($page-entries)) {
foreach ($page-entries as $adGroupAd) {
  printf(Ad with id '%s', type '%s', and status '%s' was found.\nbr,
$adGroupAd-ad-id, $adGroupAd-ad-AdType, $adGroupAd-status);
  
}
  }
  
// Create report definition.
  $reportDefinition = new ReportDefinition();
  $reportDefinition-reportName = 'AD performance report #' . time();
  $reportDefinition-reportType = 'AD_PERFORMANCE_REPORT';
  $reportDefinition-downloadFormat = 'CSV';
  $reportDefinition-selector = $selector;


  // 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);   

$reportDefinitionId = $reportDefinition-id;
   $fileName = 'tv_g_ppc_ad_data.csv';
$path = dirname(__FILE__) . '/data/' . $fileName;


 // Download report.
  ReportUtils::DownloadReport($reportDefinitionId, $path, $user);

  printf(Report with definition id '%s' was downloaded to '%s'.\n,
  $reportDefinitionId, $path, $fileName);*/
  }
}
  
  
  else {
print No ads were found.\n;
  }
} catch (Exception $e) {
  print $e-getMessage();
}

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Report Definition Clarification

2011-04-14 Thread Peter Stannett
Ok, Tried that and get IMPROPERLY_FORMATTED_REQUEST. If anyone else has any 
pointers I would be very grateful.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Report Definition Clarification

2011-04-14 Thread Peter Stannett
Hi and thanks for replying.

Hmm ...i think i have got them commented out. Perhaps you would oblige me by 
looking at my code?

Here is my AddAdgroupPerformanceReport.php

?php

// 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';


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');

  
 // $adGroupId = (float) '';
//$startDate = '';
//$endDate = '';

  // Create selector.
  $selector = new Selector();
  $selector-fields = array('Date','CampaignName', 'CampaignStatus', 
'AdGroupName', 'Status',  'Impressions', 'Clicks', 'Cost', 
'AveragePosition','ConversionsManyPerClick');
  //S$selector-dateRange = new DateRange($startDate, $endDate);

  // Create predicates.
  //$adGroupIdPredicate = new Predicate('AdGroupId', 'EQUALS', 
array($adGroupId));
  //$selector-predicates = array($adGroupIdPredicate);

  // Create report definition.
  $reportDefinition = new ReportDefinition();
  $reportDefinition-reportName = 'ADGROUP performance report #' . time();
  $reportDefinition-dateRangeType = 'YESTERDAY';
  $reportDefinition-reportType = 'ADGROUP_PERFORMANCE_REPORT';
  $reportDefinition-downloadFormat = 'CSV';
  $reportDefinition-selector = $selector;


  // 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);   
   
$reportDefinitionId = $reportDefinition-id;
   $fileName = 'tv_g_ppc_data.csv';
$path = dirname(__FILE__) . '/data/' . $fileName;


  // Download report.
  ReportUtils::DownloadReport($reportDefinitionId, $path, $user);

  printf(Report with definition id '%s' was downloaded to '%s'.\n,
  $reportDefinitionId, $path, $fileName);


 } 
 
} 
  
 
 else {
print No report definitions were added.\n;

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

  
This generated a report id of 1302769510

I entered this id into downloadreport.php

?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';
$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';

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();

  $reportDefinitionId = '1302681607';
  $fileName = 'tv_g_ppc_data.csv';

  $path = dirname(__FILE__) . '/data/' . $fileName;

  // Download report.
  ReportUtils::DownloadReport($reportDefinitionId, $path, $user);

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

Not sure what I am doing wrong here? It's probably very simple!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Report Definition Clarification

2011-04-13 Thread Peter Stannett
Ah thanks Pete I shall give that a try!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Report Definition Clarification

2011-04-12 Thread Peter Stannett
Hi all

I created a Adgroup Performance report to run daily for the previous day and 
this runs fine. Every day it creates a new Report Definition however I 
half-think I read that somewhere I can download a new instance of this 
report, rather than create a new Report. I would imagine this is a lot more 
cost effective. 

If this is the case, how would I implement this? If it isn't the case...then 
i will go back to sleep.

Regards
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Php errors

2011-04-06 Thread Peter Stannett
Hi 

I have just moved my install of adwords api php onto our server after 
working flawlessly on my MAMP install and i have come across many errors!

This may be more appropriate for a php specific forum however I was hoping 
that more knowledgeable people here would be kind enough to help me fix 
this.

My errors are:

Warning: 
fopen(/Library/WebServer/Documents/aw_api_php_lib_2.5.1/logs/soap_xml.log): 
failed to open stream: Permission denied in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/Common/Util/Logger.php
 
on line 203 Warning: fwrite() expects parameter 1 to be resource, boolean 
given in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/Common/Util/Logger.php
 
on line 206 Warning: fclose() expects parameter 1 to be resource, boolean 
given in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/Common/Util/Logger.php
 
on line 207 Warning: 
fopen(/Library/WebServer/Documents/aw_api_php_lib_2.5.1/logs/request_info.log): 
failed to open stream: Permission denied in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/Common/Util/Logger.php
 
on line 203 Warning: fwrite() expects parameter 1 to be resource, boolean 
given in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/Common/Util/Logger.php
 
on line 206 Warning: fclose() expects parameter 1 to be resource, boolean 
given in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/Common/Util/Logger.php
 
on line 207 Report definition with name 'ADGROUP performance report 
#1302097991' and id '16405962' was added. Warning: 
fopen(/Library/WebServer/Documents/aw_api_php_lib_2.5.1/examples/v201101/data/tv_g_ppc_data.csv):
 
failed to open stream: Permission denied in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/AdWords/Util/ReportUtils.php
 
on line 85 Warning: curl_setopt(): supplied argument is not a valid 
File-Handle resource in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/AdWords/Util/ReportUtils.php
 
on line 87 

I understand a lot of these are permission denied errors but I have enabled 
write permissions on all the folders etc. Also I am not sure what it means 
by boolean as I haven't amended anything within the Logger.php

I would be most grateful if anyone could help me resolve this.

Best
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Php errors

2011-04-06 Thread Peter Stannett
Hi Evgeniy

Thank you very much for taking the time to help me. 

I have rebooted the server and the permissions change seems to have come 
into effect. However I have a new set of errors! Why can't this be simple?! 
Haha!

I appreciate your help!

Report definition with name 'ADGROUP performance report #1302102046' and id 
'16413042' was added. Warning: 
fopen(/Library/WebServer/Documents/aw_api_php_lib_2.5.1/examples/v201101/data/tv_g_ppc_data.csv):
 
failed to open stream: Permission denied in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/AdWords/Util/ReportUtils.php
 
on line 85 Warning: curl_setopt(): supplied argument is not a valid 
File-Handle resource in 
/Library/WebServer/Documents/aw_api_php_lib_2.5.1/src/Google/Api/Ads/AdWords/Util/ReportUtils.php
 
on line 87 ADGROUP performance report #1302102046


Also I do'nt understand as it is trying to retrieve data form all time, 
despite my code stating only yesterday:


?php

ini_set('display_errors', true); # Display error in browser (set this to 
false in production envoirment)

error_reporting (E_ALL ^ E_NOTICE); # what kind of errors do you want to 
display (almost all)

date_default_timezone_set('America/Los_Angeles');

/**

 * This example adds a keywords performance report. To get ad groups, run

 * GetAllAdGroups.php. To get report fields, run GetReportFields.php.

 *

 * Tags: ReportDefinitionService.mutate

 *

 * PHP version 5

 *

 * Copyright 2011, Google Inc. All Rights Reserved.

 *

 * Licensed under the Apache License, Version 2.0 (the License);

 * you may not use this file except in compliance with the License.

 * You may obtain a copy of the License at

 *

 * http://www.apache.org/licenses/LICENSE-2.0

 *

 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an AS IS BASIS,

 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and

 * limitations under the License.

 *

 * @packageGoogleApiAdsAdWords

 * @subpackage v201101

 * @category   WebServices

 * @copyright  2011, Google Inc. All Rights Reserved.

 * @licensehttp://www.apache.org/licenses/LICENSE-2.0 Apache License, 
Version 2.0

 * @author Eric Koleda api.ekol...@gmail.com

 */


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';



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');


  

//  $adGroupId = (float) '';

$startDate = '20110504';

$endDate = '20110504';


  // Create selector.

  $selector = new Selector();

  $selector-fields = array('Date','CampaignName', 'CampaignStatus', 
'AdGroupName', 'Status',  'Impressions', 'Clicks', 'Cost', 
'AveragePosition','ConversionsManyPerClick');

 // $selector-dateRange = new DateRange($startDate, $endDate);


  // Create predicates.

  //$adGroupIdPredicate = new Predicate('AdGroupId', 'EQUALS', 
array($adGroupId));

  //$selector-predicates = array($adGroupIdPredicate);


  // Create report definition.

  $reportDefinition = new ReportDefinition();

  $reportDefinition-reportName = 'ADGROUP performance report #' . time();

  $reportDefinition-dateRangeType = 'CUSTOM_DATE';

  $reportDefinition-reportType = 'ADGROUP_PERFORMANCE_REPORT';

  $reportDefinition-downloadFormat = 'CSV';

  $reportDefinition-selector = $selector;



  // 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);   

   

$reportDefinitionId = $reportDefinition-id;

   $fileName = 'tv_g_ppc_data.csv';

$path = dirname(__FILE__) . '/data/' . $fileName;


  // Download report.

  ReportUtils::DownloadReport($reportDefinitionId, $path, $user);


  printf(Report with definition id '%s' was downloaded to '%s'.\n,

  $reportDefinitionId, $path, $fileName);



 } 

 

} 

  

 

 else {

print No report definitions were added.\n;



  }

} catch 

Re: Php errors

2011-04-06 Thread Peter Stannett
Genius!

You are a gentleman and a scholar with a legendary first name!

Thank you very much for your help. If only I knew where you were, I would 
happily buy you a drink!

Thanks again!

Kind regards
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Fwd: Automating DownloadReport.php

2011-03-28 Thread Peter Stannett
Hi All

Can anyone help me here at all?

Thanks 
Peter

Begin forwarded message:

 From: Peter Stannett pstannet...@gmail.com
 Date: 25 March 2011 14:00:50 GMT
 To: AdWords API Forum adwords-api@googlegroups.com
 Subject: Re: Automating DownloadReport.php
 Reply-To: pstannet...@gmail.com
 
 HI Chris
 
 Thanks for the reply.
 
 I am using the latest V2011 version. It's probably something very
 simple but I can't spot it!
 
 Thanks
 Peter
 
 On Mar 25, 1:39 pm, chris h back5...@gmail.com wrote:
 Which version of the API?
 
 -- 
 =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 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

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Automating DownloadReport.php

2011-03-25 Thread Peter Stannett
Hi all

I have got a Adgroup Performance Report set up to return all adgroup
stats which is great.

Of course I run this and I get the id of the report. Then I add this
id to the DownloadReport.php file to then actually download the file
to my computer.

Can someone tell me how to automate this? As I am manually adding the
report id to DownloadReport.php every time it can get a bit tedious.

I tried combining the code but it breaks.

Thanks
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Automating DownloadReport.php

2011-03-25 Thread Peter Stannett
HI Chris

Thanks for the reply.

I am using the latest V2011 version. It's probably something very
simple but I can't spot it!

Thanks
Peter

On Mar 25, 1:39 pm, chris h back5...@gmail.com wrote:
 Which version of the API?

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Adwords Reporting

2011-03-14 Thread Peter Stannett
Hi Anash

Thank you very much. I have managed to get the report service going
for at an adgroup level as per the links you sent me so that is great.
Is there a service or method of being able to query more than one
client at an adgroup level?

At the moment I would be limited to using GetAllCampaigns, then adding
in the campaignid into GetAllAdgroups.php, then finding out the
adgroupid and adding that to the report in order to run the adgroup
report to return all the relevant stats. It's quite time consuming!
Is there anything already provided so I can enter x number of client
emails or would I have to construct a php loop of sorts?

Kind regards
Peter


On Mar 14, 9:34 am, AdWords API Advisor adwordsapiadvi...@google.com
wrote:
 Hi Peter,

 Please feel free to ask any questions you may have, and I'll help you out.
 Also,http://code.google.com/apis/adwords/videos/has a new video on
 ReportService. I haven't watched it yet since it is a recent video, but I'm
 sure it covers more details that can help you out.

 Cheers,
 Anash P. Oommen,
 AdWords API Advisor.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Adwords Reporting

2011-03-10 Thread Peter Stannett
Hi Anash

Thank you very much for your reply. It is very much appreciated!

Thank you for the links. I think my issue is that I followed the video
tutorial on how to access the sandbox, which was easy to follow. I
then managed to log into the production api and retrieve headline info
(campaign id and the relevant adgroups) but when I looked at the
reporting, I couldn't find anything so succinct as the sandbox video.

Being new to the api and php in general, I was left scratching my head
for a while on how to implement the reporting. I shall look at the
links you sent me and hopefully I can make head or tail of it!

thanks again
Peter



On Mar 10, 2:03 pm, AdWords API Advisor adwordsapiadvi...@google.com
wrote:
 HI Peter,

 You can start by downloading the AdWords API PHP client library 
 fromhttp://code.google.com/p/google-api-adwords-php. It has support for all 
 the
 API versions, and has code examples for all the common tasks.

 To schedule and download a report, you can take a look at the following code
 examples:
 - Create a report 
 definition:http://code.google.com/p/google-api-adwords-php/source/browse/trunk/e...
 - Download a 
 report:http://code.google.com/p/google-api-adwords-php/source/browse/trunk/e...

 The code example I've provided you is for keyword performance report, but
 the code for creating an adgroup report is quite similar. You can refer 
 tohttp://code.google.com/apis/adwords/docs/appendix/reports.htmlfor the set
 of supported reports and supported fields.

 v201101 introduces cross client reports, which allows you to fetch reports
 from multiple accounts as a single report. However, this feature is
 restricted to only a few developers. We hope to make it available for all
 developers in coming weeks. Once that is available, you should be able to
 run cross-client reports without any issues. Till then, you could choose to
 run reports for one account at a time. 
 Seehttp://adwordsapi.blogspot.com/2011/03/update-to-reporting-service-in...for
 details.

 Here are some other links you can refer to for knowing more about report
 definition service:

 http://code.google.com/apis/adwords/docs/reportingtopics.htmlhttp://adwordsapi.blogspot.com/2010/07/introduction-to-reportdefiniti...http://adwordsapi.blogspot.com/2010/07/discover-v201003-migrating-you...

 Cheers,
 Anash P. Oommen,
 AdWords API Advisor.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Hourly AdGroup Performance Report

2011-03-09 Thread Peter Stannett
Hi Tyler

I'm definitely no expert but I would imagine you might need to run a
cron job?

Would you be willing to show me the code in php for how you wrote your
report?

I'm very new to the api and trying to find a decent example of
reporting in php is quite hard!

Kind regards
Peter

On Mar 9, 5:26 pm, Tyler adwo...@hellometro.com wrote:
 Can anyone provide an example of how to run an AdGroup performance
 report for a given time frame at the hour level?

 For example, 8pm Wednesday to 8pm Thursday.

 Any help or a point in the right direction would be great. I'm
 currently using the PHP client library to do things like update bids
 but I can't find any examples of how to run an hourly report.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Adwords Reporting

2011-03-08 Thread Peter Stannett
Hi everyone.

Would someone be willing to explain how I would achieve the following?

I am trying to compile a report (and have had no success with the
examples..api newbie!) that shows the adgroup level data (cost,
impressions etc) for the day before, for every live campaign, for more
than one client.

I have looked at the report documentation example that is in java but
I need to develop in php. I am not even sure where to begin!

Thanks for any pointers and I appreciate this is quite a big ask!

Kind regards
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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: Google Api Sandbox nightmare

2011-03-08 Thread Peter Stannett
Thank you Anash for your help

On Mar 8, 3:43 am, AdWords API Advisor adwordsapiadvi...@google.com
wrote:
 Hi Peter,

 You may have to use date_default_timezone_set() to set an appropriate
 timezone. Seehttp://php.net/manual/en/function.date-default-timezone-set.php
 for a discussion on the warning you are seeing. As for the sandbox
 errors, I believe they should be gone now after the sandbox refresh.
 If you are still seeing issues, please let me know.

 Cheers,
 Anash P. Oommen,
 AdWords API Advisor.

 On Mar 4, 11:16 pm, Peter Stannett pstannet...@gmail.com wrote:







  Ah thanks for the heads up. That may explain the API error but not sure how
  to get around the timezone issue..

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Google Api Sandbox nightmare

2011-03-04 Thread Peter Stannett
Hello Everyone

I am hoping someone can help me. I am stumped at the very start of this 
sandbox and I can't figure out how to sort it.

I am trying to connect to sandbox via terminal. I have my php library in 
htdocs folder in MAMP. I use terminal to open GetAllCampaigns.php and after 
a pause I get:

Warning: date(): It is not safe to rely on the system's timezone settings. 
You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods 
and you are still getting this warning, you most likely misspelled the 
timezone identifier. We selected 'UTC' for 'GMT/0.0/no DST' instead in 
/Applications/MAMP/htdocs/adwords_api/src/Google/Api/Ads/Common/Util/Logger.php 
on line 203

Warning: date(): It is not safe to rely on the system's timezone settings. 
You are *required* to use the date.timezone setting or the 
date_default_timezone_set() function. In case you used any of those methods 
and you are still getting this warning, you most likely misspelled the 
timezone identifier. We selected 'UTC' for 'GMT/0.0/no DST' instead in 
/Applications/MAMP/htdocs/adwords_api/src/Google/Api/Ads/Common/Util/Logger.php 
on line 203
[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
[Ljava.lang.StackTraceElement;@1db8edf]Peters-MacBook-Pro:v200909 peters$ 


In my php ini I did not have a default date setting so I added: 
date_default_timezone_set('America/Chicago'); 
My auth ini shows

email = myemail
password = mypassword
userAgent = mycompany
applicationToken = ignored
developerToken = myemail+GBP

; Uncomment to make requests against a client account.
clientId = client_1+myemail

; Uncomment the following to use an existing AuthToken.
; authToken = INSERT_AUTH_TOKEN_HERE

; Uncomment the following to use existing OAuth information.
; [OAUTH]
; oauth_consumer_key = INSERT_OAUTH_CONSUMER_KEY_HERE
; oauth_consumer_secret = INSERT_OAUTH_CONSUMER_SECRET_HERE
; oauth_token = INSERT_OAUTH_TOKEN_HERE
; oauth_token_secret = INSERT_OAUTH_TOKEN_SECRET_HERE

My settings.ini have been changed to adwords-sandbox.google.com

After no luck here, I installed all the files on my live server in a shared 
environment using justhost.com

I get more error messages


*Strict Standards*: date() 
[function.datehttp://www.sgm-staging.co.uk/SGM_PPC/adwords_api/examples/v200909/function.date]:
 
It is not safe to rely on the system's timezone settings. Please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. In case you used any of those methods 
and you are still getting this warning, you most likely misspelled the 
timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' 
instead in*
/home/sgmstag1/public_html/SGM_PPC/adwords_api/src/Google/Api/Ads/Common/Util/Logger.php
* on line *203*

*Strict Standards*: date() 
[function.datehttp://www.sgm-staging.co.uk/SGM_PPC/adwords_api/examples/v200909/function.date]:
 
It is not safe to rely on the system's timezone settings. Please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. In case you used any of those methods 
and you are still getting this warning, you most likely misspelled the 
timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' 
instead in*
/home/bred1/public_html/PPC/adwords_api/src/Google/Api/Ads/Common/Util/Logger.php
* on line *203*

*Strict Standards*: date() 
[function.datehttp://www.sgm-staging.co.uk/SGM_PPC/adwords_api/examples/v200909/function.date]:
 
It is not safe to rely on the system's timezone settings. Please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. In case you used any of those methods 
and you are still getting this warning, you most likely misspelled the 
timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' 
instead in*
/home/bred1/public_html/PPC/adwords_api/src/Google/Api/Ads/Common/Util/Logger.php
* on line *203*

*Strict Standards*: date() 
[function.datehttp://www.sgm-staging.co.uk/SGM_PPC/adwords_api/examples/v200909/function.date]:
 
It is not safe to rely on the system's timezone settings. Please use the 
date.timezone setting, the TZ environment variable or the 
date_default_timezone_set() function. In case you used any of those methods 
and you are still getting this warning, you most likely misspelled the 
timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' 
instead in*
/home/bred1/public_html/PPC/adwords_api/src/Google/Api/Ads/Common/Util/Logger.php
* on line *203*
AuthenticationError.CLIENT_EMAIL_INVALID @ ; trigger:'client_1+myemail' 
Service[CampaignService.get]

(I have amended the email above to myemail for security)

So I am stumped. I can't seem to figure this out! Can anyone help?!

Kind regards
Peter

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:

Re: Google Api Sandbox nightmare

2011-03-04 Thread Peter Stannett
Ah thanks for the heads up. That may explain the API error but not sure how 
to get around the timezone issue..


-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


AdWords API Re: Very new to the API and PHP

2009-12-03 Thread Peter Stannett
OK thanks I shall try that!

On Nov 30, 6:26 pm, AdWords API Advisor adwordsapiadvi...@google.com
wrote:
 Hi Peter,

 If you are new to the API I wouldn't recommend you use the APIlity
 library.  It has been deprecated, as has most of the v13 API it runs
 against.  It has been replaced by the AdWords API PHP client library:

  http://code.google.com/p/google-api-adwords-php/

 Best,
 - Eric Koleda, AdWords API Team

 On Nov 26, 11:43 am, Peter Stannett pstannet...@googlemail.com
 wrote:

  Hi Everyone

  Basically I need lots of help. I have downloaded the apility zip and
  uploaded the contents to my webhost under the public_html folder.

  The question I have now is..now what? I know what I want to achieve
  but am very new to this so I would appreciate some guidance. I'm
  already confused with some of the Apility documentation (i'm not thick
  btw!)

  First off it says to edit authentication .ini edit authentication.ini
  and enter your data according to your API account settings..then it
  goes on to say do not put it in a web-readable area of your host..then
  it says

   The most secure way to make sure no one can steal your account login
  data is to provide the login data directly. Therefore, after including
  APIlity into your project file, set the authentication context
  manually as shown below:

    include('apility');
    $apilityUser = new APIlityUser(
        'em...@isp.tld',
        'p455woRd',
        'clientem...@isp.tld',
        'D3v3Lop3rT0keN',
        '4pPlicaTi0nTok3n');

  This means leaving authentication.ini untouched. 

  So what am i supposed to do? Edit the ini file or not?! What does it
  mean by manually? Every time I want to do something? It's not overly
  transparent...

  And then within the apility folder the readme file says Getting
  started is easy, just check out the given example.
  If I load any page it's blank!

  I have edited auth.ini with my details (but then surely that shouldn't
  be in the same folder...see above note..should I be amending the ini
  file or not?).

  I have amended setttings.ini to use the sandbox and i get error
  messages left right and centre. i am sure I am missing something quite
  simple but it's not overly clearly laid out for a noob.

  Any help would be very much appreciated!

  Regards
  Peter

--

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-...@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.




AdWords API Very new to the API and PHP

2009-11-30 Thread Peter Stannett
Hi Everyone

Basically I need lots of help. I have downloaded the apility zip and
uploaded the contents to my webhost under the public_html folder.

The question I have now is..now what? I know what I want to achieve
but am very new to this so I would appreciate some guidance. I'm
already confused with some of the Apility documentation (i'm not thick
btw!)

First off it says to edit authentication .ini edit authentication.ini
and enter your data according to your API account settings..then it
goes on to say do not put it in a web-readable area of your host..then
it says

 The most secure way to make sure no one can steal your account login
data is to provide the login data directly. Therefore, after including
APIlity into your project file, set the authentication context
manually as shown below:

  include('apility');
  $apilityUser = new APIlityUser(
  'em...@isp.tld',
  'p455woRd',
  'clientem...@isp.tld',
  'D3v3Lop3rT0keN',
  '4pPlicaTi0nTok3n');

This means leaving authentication.ini untouched. 

So what am i supposed to do? Edit the ini file or not?! What does it
mean by manually? Every time I want to do something? It's not overly
transparent...

And then within the apility folder the readme file says Getting
started is easy, just check out the given example.
If I load any page it's blank!

I have edited auth.ini with my details (but then surely that shouldn't
be in the same folder...see above note..should I be amending the ini
file or not?).

I have amended setttings.ini to use the sandbox and i get error
messages left right and centre. i am sure I am missing something quite
simple but it's not overly clearly laid out for a noob.

Any help would be very much appreciated!

Regards
Peter

--

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-...@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.