コード例 #1
0
 public function setDefaults()
 {
     parent::setDefaults();
     $this->object->criterion = new Platform();
     $this->object->criterion->id = APIADLIB_CRITERION_ID;
     $this->object->bidModifier = APIADLIB_BID_MODIFIER;
 }
コード例 #2
0
 /**
  * Sets campaign defaults
  */
 function setDefaults()
 {
     parent::setDefaults();
     if (isset($this->user)) {
         $this->budgetService = $this->user->GetService('BudgetService');
     }
     $this->object->name = 'New Campaign #' . uniqid();
     // Set additional settings (optional).
     $this->object->status = 'PAUSED';
     $this->object->startDate = date('Ymd', strtotime('+1 day'));
     $this->object->endDate = date('Ymd', strtotime('+1 month'));
     $this->object->adServingOptimizationStatus = 'ROTATE';
     $this->object->advertisingChannelType = 'SEARCH';
     $this->object->budget = new Budget();
     $this->object->budget->name = 'New Campaign Budget #' . uniqid();
     $this->object->budget->period = 'DAILY';
     $this->setBudgetAmount(50000000);
     $this->object->budget->deliveryMethod = 'STANDARD';
     //@todo servingStatus и список в форме как R/O (https://developers.google.com/adwords/api/docs/reference/v201402/CampaignService.Campaign)
     $this->object->biddingStrategyConfiguration = new BiddingStrategyConfiguration();
     $this->object->biddingStrategyConfiguration->biddingStrategyType = 'MANUAL_CPC';
     //        $this->class->biddingStrategyConfiguration->biddingScheme = new BiddingScheme();
     $this->object->networkSetting = new NetworkSetting();
     $this->object->networkSetting->targetGoogleSearch = true;
     $this->object->networkSetting->targetSearchNetwork = true;
     $this->object->networkSetting->targetContentNetwork = true;
     $this->object->frequencyCap = new FrequencyCap();
     $this->object->frequencyCap->impressions = 5;
     $this->object->frequencyCap->timeUnit = 'DAY';
     $this->object->frequencyCap->level = 'ADGROUP';
     $this->object->settings[] = new KeywordMatchSetting(true);
     $this->object->settings[] = new GeoTargetTypeSetting('DONT_CARE', 'DONT_CARE');
     //@todo Добавить в формы gaw-approve
     $this->object->settings[] = new DynamicSearchAdsSetting('-', 'en');
 }
コード例 #3
0
 public function setDefaults()
 {
     parent::setDefaults();
 }