Get clientCustomerIds after Oauth permission granted

2014-08-27 Thread Mike Young
I have just asked permission to use the clients adwords data and they have 
accepted. (they can revoke if they want to.)

I now need to make an API call to get user data.

I need to know the clientCustomerId to make a call via API.

I have ran GetAccountHierachy.php (using different refresh token) and this 
does show me all accounts linked to my MCC...BUT

I don't want them linked to my MCC, As this is a manual process.

I need to just get the  clientCustomerId.

Can I traverse the tree (see coding inside Getaccountheirachy.php) and find 
the root account number?

HOW?

I have a refresh token?

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/248cb5f0-b24b-4af6-8094-30ce2af94084%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Set refreshtoken in PHP

2014-08-27 Thread Mike Young
I have saved the refresh tokens for clients in a database, and when needed 
want to use that refresh token to call API.

How do I set that refresh token dynamically and not set in stone as the 
auth.ini file does?

Using PHP v201402




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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5139e3dd-9ca8-428d-8e1d-6015543c0f9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Client with bad characters in name @ - Cant get report!

2014-07-08 Thread Mike Young
I have a client that has added their adwords client name as an email 
address? (yer I know!)

Usually a client name would be what you choose in the dropdown (top left 
corner of adwords)
This could be Debenhams, Boots, Superdrugs etc

*Problem: -*
When I run an API report, it gets all the data except the client name 
(t...@test.com) 
I need it to be shown, as it then gets placed into a database.
I cant seem to swap or change the character anywhere in the code. Its 
probably the XML thats the cause.
How do I overcome illegal characters as a client name and download there 
report?

Using PHP -  API version 201402 - CAMPAIGN_PERFORMANCE_REPORT

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Max number 2147.483647 type money using API

2014-06-17 Thread Mike Young
Ok I solved this 

*I changed this: *

  case 'money':
return $value / 100;

*to this: -*

  case 'money':
return floatval($value) / 100;

well done me!

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Max number 2147.483647 type money using API

2014-06-17 Thread Mike Young
For some reason some of the data that is coming back in my API calls is 
2147.483647, but this is not the same in Adwords.

This seems to be the max value of a fixed point number and has a range of 
-2147.483648 to *2147.483647* // to exactly 6 decimals

I have seen this error causing problems elsewhere

QUESTION: -
How would I retrieve data that is larger than £2147?

I'm using the Adwords API and displaying in a table

Two extracts of code are below: -

1. 'Cost' => array('name' => 'cost', 'type' => 'money'),

2.   switch ($reportFields[$fieldName]['type']) {
case 'float':
return floatval($value);
case 'integer':
return intval($value);
case 'money':
return $value / 100;
default:
return (string) $value;
}


Should I use any other type to get correct data?

I'm Using PHP, and displaying directly from the API call, this does not 
come from a database.

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Script stops on error of $clientCustomerId not in MCC (PHP)

2014-05-22 Thread Mike Young
I have a simple script that calls multiple $clientCustomerId's in an array. 
(25 clients and all the campaigns)
Its been working for 1 year. 
Someone revoked access to the second client in the list by accident, 
therefore knocking it out of the MCC.

It now gets data for the first client but then stops the rest of the 
clients processing. It breaks the script!
The clients are in a PHP array, that uses a 'for each()' loop.

Question.
How can, if one of the clients is causing an error skip and go onto the 
next without stopping...

Maybe there's an error that comes back?





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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AWQL impressions > 0 in CAMPAIGN_PERFORMANCE_REPORT

2014-05-19 Thread Mike Young
Hi, Solved this myself!

In my script I was getting the data for TODAY, YESTERDAY, and LAST_MONTH 
for many clients all in one go.
BUT when I get it for just the TODAY date range it works

The api does not know what date range the impressions > 0 was to be applied 
to...




On Wednesday, 14 May 2014 16:25:36 UTC+1, Josh Radcliff (AdWords API Team) 
wrote:
>
> Hi,
>
> Using *Impressions > 0* as you described should work, assuming you are 
> using a 
> CAMPAIGN_PERFORMANCE_REPORT<https://developers.google.com/adwords/api/docs/appendix/reports#campaign>
>  since 
> on that report the *Status* column refers to the campaign's status. Are 
> you sure that the paused campaigns had impressions for the date range you 
> specified in your *DURING* clause?
>
> If the date range is not the issue, please send the following *only to me* by 
> clicking *Reply to Author*:
>
>- Customer ID
>- Complete report definitions/AWQL queries used
>- Report responses received
>
> Cheers,
> Josh, AdWords API Team
>
> On Wednesday, May 14, 2014 9:57:48 AM UTC-4, Mike Young wrote:
>>
>> In my AWQL report, it gets all the necessary data, but when something was 
>> paused it would not get the data.
>>
>> I need only campaigns with more than zero impressions, paused or not.
>>
>> I was using "WHERE Status IN [ACTIVE]" within my statement.
>>
>> so I changed it to "Impressions > 0" and it makes no difference at 
>> all.
>>
>> I also tried "WHERE Status IN [ACTIVE,PAUSED] AND Impressions > 0"
>>
>> Please help!
>>
>> Using API 201402
>>
>>
>>
>>
>>
>>

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AWQL impressions > 0 in CAMPAIGN_PERFORMANCE_REPORT

2014-05-14 Thread Mike Young
In my AWQL report, it gets all the necessary data, but when something was 
paused it would not get the data.

I need only campaigns with more than zero impressions, paused or not.

I was using "WHERE Status IN [ACTIVE]" within my statement.

so I changed it to "Impressions > 0" and it makes no difference at all.

I also tried "WHERE Status IN [ACTIVE,PAUSED] AND Impressions > 0"

Please help!

Using API 201402





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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Set a budget with static BudgetId

2014-03-28 Thread Mike Young
Using V201402

How do I set the budget of a campaign using a stored BudgetId and stored 
CampaignId?
I do not want to create a campaign, just change one.

Using the following in PHP (not working code but bits that I have collected 
from others!): -


require_once 'Google/Api/Ads/AdWords/v201402/BudgetService.php';

$budgetService = $user->GetService('BudgetService', 201402);

$budget = new Budget();
$budget->budgetId = "3067231";
$budget->amount->microAmount = "1500";

$campaign->budget = $budget;

$operation = new CampaignOperation();
$operation->operand = $campaign;
$operation->operator = 'SET';
   
$operations = array($operation);
$result = $budgetService->mutate($operations);


Am I anywhere near?


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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Set budget (not shared) and location (PHP)

2014-03-27 Thread Mike Young
Was there an answer that would set a budget for a single campaign? (if I 
have budget ID and campaign name in a variable stored already in a DB)

I'm using AWQL method..

Is it as Rick says...something like: -

$mycampaignname= "abctaxis";

$campaign->budget = 50.00; 

  $budget = new Budget();
  $budget->name = $mycampaignname.' budget';
  $budget->period = 'DAILY';
  $budget->amount = new Money($budget);
  $budget->deliveryMethod = $deliveryMethod;

  $operations = array();

  // Create operation.
  $operation = new BudgetOperation();
  $operation->operand = $budget;
  $operation->operator = 'ADD';
  $operations[] = $operation;


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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pull campaign stats for one MCC with sub accounts

2014-03-10 Thread Mike Young

>
> I am already setting the client customer ID this way. 
>
 

> Every time it is run, it grabs a new client id from a text file that has 
> all of our client id numbers in. But I want them all in one long report 
> once every 10 minutes.
>
At the moment if I have 30 clients, that 30th client will not be updated 
for 30 minutes, as it runs the scheduled file every 1 minutes. 

I would like to see :- 
$this->SetClientCustomerId("123-456-7890","987-654-3210","123-456-7890");

Your code could be "If array, then count how many in this array, and loop 
that many times. 

So just to be clear by entering your MCC id, you *can't *get reporting 
stats from many sub accounts in one go, without changing the code. 
 
Regards Mike 
 

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pull campaign stats from MCC with a lot of sub accounts

2014-03-07 Thread Mike Young
This question was asked a few years ago. I have made a few amendments, and 
pasted it again, as it was never really answered(Full question and 
replies, https://groups.google.com/forum/#!topic/adwords-api/zZB9oaURERM)


Can anyone give me a run down on how to  pull campaign stats for one MCC 
with a LOT of sub accounts within it?
Example Account Structure for our MCC:

XX, MAIN MCC ACCOUNT
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account


I need to be able to iterate dynamically through our entire list of 
accounts (quite large 25 clients) and perform a campaign stats report for 
each one, then use the returned data and store it into our own DB.
The campaign stats example file is great, but it takes a hard coded 
clientCustomerID from the auth.ini file in order to run that report with 
the live service.  I can run the account hierarchy example file, and get 
all of our account id's, and the client customer ID's of each sub and 
tertiary account, but I don't see a way to use the adwords user constructor 
in combination with these two example files in order to pull the right data.

The php client library has lots of example files, but not much in the way 
of 'how-to' guides explaining how to dynamically run reports without the 
use of the auth.ini file, or how I can perform dynamic reporting with 
threading.

I need one report, of 25 clients.

I have already created a script that rotates via a scheduled task for each 
client, that is run every minute. (But this means each client is only 
updated every 25 mins)

Help..

P.S. I'm using PHP




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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to get stats using Firefox Poster Plugin (SOAP - Adhoc)

2014-03-07 Thread Mike Young
The firefox plugin called poster 
(https://addons.mozilla.org/en-US/firefox/addon/poster/) would be a good 
way to start. 
What headers and coding would I need to use as I need to test my xml code.

At the moment I have in the main window: -

Posting to *(url)*  
*https://adwords.google.com/api/adwords/reportdownload/v201309*
*Content type = multipart/form-data*

__rdxml=https://adwords.google.com/api/adwords/cm/v201309";>
  
Impressions
Clicks
Cost

  Status
  IN
  ACTIVE
  PAUSED

  
  Custom Mike Report
  CAMPAIGN_PERFORMANCE_REPORT
  TODAY
  XML


I need to add the SOAP envelope but have had many problems
HEADERS used are: -

   - Authorization: 1/Kck
   - developerToken: _RK0xx
   - clientCustomerId: 123-456-7890(this is not my main MCC account 
   but a sub account?, Is this correct)
   - returnMoneyInMicros: true


Can anyone help?

Just need stats in xml..to download

 





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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pull campaign stats for one MCC with sub accounts

2014-03-07 Thread Mike Young
My question is the same exactly what was posted two years ago that is 
below. I have tried everything.how can I change the 
getcampaignstats.php or another file such as Downloadreportcriteria.php and 
hard code the *ClientCustomerId*. 
I will then use this many times each with a different *ClientCustomerId in. 
(Then it will not take the value from AdwordsUser.php*, and I can run many 
of them at one time, via threadding etc)


*Can anyone give me a run down on how to  pull campaign stats for one MCC 
with a LOT of sub accounts within it?*
I can't seem to find much in the way of advice for this.
Example Account Structure for our MCC:

XX, MAIN MCC ACCOUNT
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account
--XX, Sub Account


I need to be able to iterate dynamically through our entire list of 
accounts (quite large 25 clients) and perform a campaign stats report for 
each one, then use the returned data and store it into our own DB.

The campaign stats example file is great (V201306 (will update version 
later), but it takes a hard coded clientCustomerID from the auth.ini file 
in order to run that report with the live service.  
I can run the account hierarchy example file, and get all of our account 
id's, and the client customer ID's of each sub account.
The php client library has lots of example files, but not much in the way 
of 'how-to' guides explaining how to dynamically run reports without the 
use of the auth.ini file, or how I can perform dynamic reporting with 
threading.

Full question and replies are here 
(https://groups.google.com/forum/#!topic/adwords-api/zZB9oaURERM)

The adhoc answer at the bottom does not show full code for php.
I would love to be able to report using this way


 (Someone please help)

Thanks!

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ad Hoc reporting for PHP

2014-02-28 Thread Mike Young

>
> Yes the PHP way I am currently using (v201306, 
> getcampaignstats.php)..I have created a way to rotate the clientiD in 
> the auth.ini file, but not for the new version for some reason.
>

Are you saying I should : -
1. Run the file download criteria report to get todays report
2. Then run another version to get yesterdays,
3. Then change the auth.ini file clientid number and then  

For the next client
1. Run the file download criteria report to get todays report
2. Then run another version to get yesterdays,
3. Then change the auth.ini file clientid number and then  

For the next client
1. Run the file download criteria report to get todays report
2. Then run another version to get yesterdays,
3. Then change the auth.ini file clientid number and then  

ETC 25 times for each client?

How do I run multiple reports (today and yesterday) for many clients.

I have done this using the Bing API in 63 lines of code !
I provide the MCC and it gets all clients in one go.

Google so far is 29MB , does not get reports for different days or 
different clients.

Can you provide a definitive answer to how one should obtain these reports?

Please help






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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Ad Hoc reporting for PHP

2014-02-25 Thread Mike Young
Could you point me in the direction of clear examples of Ad hoc reporting 
using PHP.
Is this the same as using the soap way?

I wish to download stats (conversions, cost, impressions etc) for 25 
clients every 10 minutes. 
I need today stats and yesterday statsin one go

Is this the best way

Looking here 
https://developers.google.com/adwords/api/docs/guides/reporting, does not 
really help.
What is  Authorization: *Bearer OAUTH2_ACCESS_TOKEN? *
An example of what it looks like would help.


and here https://developers.google.com/adwords/api/docs/first-request
does not have any PHP examples...but does have pyton and java!

Please Help!



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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: content-length is required in php

2014-02-19 Thread Mike Young

Hi Paul,

I have the same problem with  my script DownloadcriteriaReportWithAWQL.php 
in the V201309 library

I have stringed two reports together one downloading a report for yesterday 
(yesterday.xml) and another that downloads todays report (today.xml)
Then it will unpick the XML after.
All fine when I use one clientCustomerId in the auth.ini file.

I was using the older client library (201306) with getcampaignstats.php and 
each time it was run it set a new clientCustomerId in the adwords user.php 
file using 
$this->SetClientCustomerId($newclientid);
which worked and changed the number each time, via a text file reading a 
new client ID with a counter.

But now I have updated the library I am getting this error, I have not 
added anything with headers etc. (not even thought about it!)
It now does not download the XML files but an error file that says this 



  
  
  Error 411 (Length Required)!!1
  STYLE STUFF!
  
  411. That’s an error.
  POST requests require a Content-length header.  
That’s all we know.

It does not seem to like a different number each time. When it is one 
number in the auth.ini file it works.

How do I stop this?


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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Basic report for many clients

2014-02-13 Thread Mike Young
Ok, if I run the same page in 10 threads (running it 10 times) it will 
still pick up the same clientID in the auth.ini file (123-456-7890)

How do I get it to change and use the rest of the client IDs that I need?


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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Basic report for many clients

2014-02-13 Thread Mike Young


By a separate thread, are you meaning a copy of the whole google adwords 
folder as it contains only one clientID in the auth.ini file. The whole 
folder download is 29mb. I cant replicate this 30 times. I do not want to 
produce spaghetti coding. 

Surely you have a procedure that gets all the campaigns in the MCC then 
runs these to get the stats and downloads it.

Is this too much?

Seems very long winded to me

What I would like to do is 

1. Run a basic stats report for 30 clients

2. This report must have Todays and Yesterdays stats. (conversions, 
cost,cpc ect)

3. Be able to import the data into a database.

You don't seem to have the most basic examples anywhere?

Adwords scripts was easy to dobut you have reduced the amount we can 
now send out each day...

Please help!


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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Basic report for many clients

2014-02-12 Thread Mike Young

How do I use a basic report for many clients. (Cost, Conversions, 
Impressions etc)

I have 1 MCC with 30 clients (all different IDs)

I would usually add the clientID in auth.ini , but as it changes have wrote 
a script with a counter that each time the API is run using a scheduled 
task (every 1 minute) the clientID changes, and increments to the next.
I have a file that contains all the client ID's and can add as many as I 
want.
This works.

*PROBLEM*
Each client only gets updated every 30 minutes due to there being 30 
clients. (one every min)
How can I run all clients every 10 minutes at the same time?

I'm using PHP coding. 
I have read all the documentation for Adwords, but cant find anything to 
support this answer.





 

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Ad Hoc Reporting to migrate to 309

2014-02-12 Thread Mike Young

Yes your quite right!, if I just take out the path where it is to download 
I get the CLI showing all of the results.
How do I capture these into a variable or array, to be able to manipulate 
them.

I have tried many ways and it seems that Curl is involved. Am I on the 
right track?
I have read the entire contents of the adwords docs, and cant see anything.

I am using the Command line interface and file = DownloadReportWithAwql.php 
>  
>

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

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Ad Hoc Reporting to migrate to 309

2014-02-06 Thread Mike Young
You say it's possible to get the report in memory or a temporary file and 
consume it directly, but you don't say how?
I want to run getcampaignstats.php in V201309, it seems this file is 
completely missing in this new version, and only csv and xml for download 
only.
Please show how using PHP I can get the same info as in the last version 
V201306. 

This is what I have at the moment how do I change this for the new version. 
I have added the old file directly into the new version and get the 
following
"An error has occurred: [SelectorError.INVALID_FIELD_NAME @ 
serviceSelector; trigger:'Impressions" - and more.

*Showing a PHP version in full of adhoc reports should be an essential part 
of your documentation !*


function GetCampaignStatsExample(AdWordsUser $user) {
  // Get the service, which loads the required classes.
  $campaignService = $user->GetService('CampaignService', ADWORDS_VERSION);

  // Create selector.
  $selector = new Selector();
  $selector->fields =
  array('Id', 'Name', 'Impressions', 'Clicks', 'Cost', 'Ctr', 
'Conversions' );
  $selector->predicates[] =
  new Predicate('Impressions', 'GREATER_THAN', array(0));
  // Set date range to request stats for.
  $dateRange = new DateRange();
  $dateRange->min = date('Ymd', strtotime('-0 day'));
  $dateRange->max = date('Ymd', strtotime('-0 day'));
  $selector->dateRange = $dateRange;
  // Create paging controls.
  $selector->paging = new Paging(0, 
AdWordsConstants::RECOMMENDED_PAGE_SIZE);
  do {
// Make the get request.
$page = $campaignService->get($selector);

// Display results.
if (isset($page->entries)) {
  foreach ($page->entries as $campaign) {
// printf("Campaign with name '%s' and id '%s' had the following 
stats "
// . "during the last week:\n", $campaign->name, $campaign->id);
echo "\nName".$campname = $campaign->name; //name
echo "\nImpressions".$impressions =  $campaign->campaignStats->impressions; 
//impressions
echo "\nClicks".$clicks = $campaign->campaignStats->clicks; //clicks
echo "\nCost".$cost = $campaign->campaignStats->cost->microAmount / 
AdWordsConstants::MICROS_PER_DOLLAR; //cost
echo "\nConversions".$conversions = $campaign->campaignStats->conversions; 
//conversions
  echo "\nCtr".$ctr = $campaign->campaignStats->ctr * 100;

echo "\nCPA".$cpa = $cost / $conversions;
echo "\nConvrate".$conversionrate = $conversions / $clicks;
echo "\nCPC".$cpc = $cost / $clicks; 

 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.