Hi,

I would like to know how to get video campaign statistics data through API.

We are using the below script with the ad performance report but can not 
receive data of video campaigns.

If you could help us, I would appreciate it.  


<?php 
require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
header('Content-type: text/plain; charset=utf-8');
class Mainapp{
 public function googlelistacc($username,$password,$CustomerId)
 {
$username=trim($username);
$password=trim($password);

$googleconfig = parse_ini_file(dirname(__FILE__) . 
'/../../../logs/configgoogleacc.ini', false);

if($password != $googleconfig['password'] || $username != 
$googleconfig['username']){
echo"Username OR Password Wrong !!!";
exit();
}

$developerToken = $googleconfig['developerToken'];

$user = new AdWordsUser(null, null, null, $developerToken);
$user->SetDefaultServer("https://adwords.google.com/";);
$user->LogAll();
$user->SetClientId($googleconfig['ClientId']);
$user->SetClientCustomerId($CustomerId);



$managedCustomerService = $user->GetService('CampaignService', 'v201506');
$selector = new Selector();

$selector->fields = array('CampaignId', 'Name','Status');
$page = $managedCustomerService->get($selector);
$accounts = array();
foreach ($page->entries as $account) {
    if ($account->id > 0) {
        $accounts[] = $account;
    }
}
$customer='';
foreach ($accounts as $account) {
$name=iconv('UTF-8','TIS-620',$account->name);
    $customer.='|'.$account->id;
$customer.='|'.$account->name;
//$customer.='|'.$account->status;
}

if(file_exists('soap_xml.log'))
{
unlink('soap_xml.log');
}
if(file_exists('request_info.log'))
{
unlink('request_info.log');
}

return  $customer;
 }
}
$Login = new Mainapp();
$data=$Login->googlelistacc($_GET['username'],$_GET['password'],$_GET['customerid']);
print $data;
?>



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/9f2e990d-8968-419e-b2ae-710b5523d118%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to