HI,
I am Unable to add the campaign for new added customer
*EX- Add Member*
/*
It is used Register member.
*/
function CreateAccountExample() {
global $user;
// Get the service, which loads the required classes.
$createAccountService =
$user->GetService('CreateAccountService', 'v201109');
$clientName=trim($_POST['firstName'].' '.$_POST['middleName'].'
'.$_POST['lastName']);
// Create account.
$account = new Account();
$account->currencyCode = 'USD';
$account->dateTimeZone = 'Asia/Calcutta';
// Create operation.
$operation = new CreateAccountOperation();
$operation->operand = $account;
$operation->descriptiveName = $clientName;
$operation->operator = 'ADD';
$operations = array($operation);
// Make the mutate request.
$result = $createAccountService->mutate($operations);
// Display result.
$account = $result[0];
return $account->customerId;
}
$customerId=CreateAccountExample();
/*
It is used Add Campaign.
*/
function addEditCampaign( AdWordsUser $user, $customerId, $campaignName) {
$campaignService = $user->GetService("CampaignService", 'v201109');
$campaign = new Campaign();
$campaign->name = $campaignName.'#'.time();
$campaign->status = 'ACTIVE';
$caption = 'added';
$campaign->biddingStrategy = new ManualCPC();
$budget = new Budget();
$budget->period = 'DAILY';
$budget->amount = new Money((float) 10000000);
$budget->deliveryMethod = 'STANDARD';
$campaign->budget = $budget;
$networkSetting = new NetworkSetting();
$networkSetting->targetGoogleSearch = TRUE;
$campaign->networkSetting = $networkSetting;
$operation = new CampaignOperation();
$operation->operand = $campaign;
$operation->operator = 'ADD';
$operations = array($operation);
$result = $campaignService->mutate($operations);
}
$user->SetClientId($customerId);
addEditCampaign( $user, $customerId, 'TEST');
-------------RESULT ARE-----------------
QuotaCheckError.INCOMPLETE_SIGNUP_LATEST_ADWORDS_API_TNC_NOT_AGREED
-------------------------------------------------
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en