Re: Add Experiment set Bid Multiplier for Max. CPC

2015-06-04 Thread Nadine Sundquist (AdWords API Team)
Hello Sany,

Could you please start a new thread with this question? I don't want to 
overload this thread with too many topics.

Thanks,
Nadine, AdWords API Team

On Thursday, June 4, 2015 at 1:52:29 AM UTC-4, Sarah Riddell wrote:

 Hi Nadine,

 Many Thanks for your reply , i have fixed above problems, can you please 
 help out on below problem?.


1. How can i *START *Experiment on campaigns ?
2. How can i *PAUSE *or *UNPAUSE *Experiment on campaigns ?

 Can you provide some example code for this?.

 AS i am successfully able to ADD  REMOVE experiments on campaigns

 Thanks, 

 Sany



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/75b06377-8ab5-4e0e-8d18-64815a684281%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add Experiment set Bid Multiplier for Max. CPC

2015-06-03 Thread Sarah Riddell
Hi Nadine,

Many Thanks for your reply , i have fixed above problems, can you please 
help out on below problem?.


   1. How can i *START *Experiment on campaigns ?
   2. How can i *PAUSE *or *UNPAUSE *Experiment on campaigns ?

Can you provide some example code for this?.

AS i am successfully able to ADD  REMOVE experiments on campaigns

Thanks, 

Sany

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/9fc26cfe-0c98-422c-97eb-adcae6b0c7cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add Experiment set Bid Multiplier for Max. CPC

2015-06-01 Thread Nadine Sundquist (AdWords API Team)
Hi Sany,

It sounds like you're trying to solve two problems. I've broken down the 
answer into parts.

*Part 1: Find the keyword by adnetworktype2.*

Information regarding targeting based on *Google Search *or *Search 
partners* is based on the NetworkSetting 
https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService.NetworkSetting
 in 
the Campaign 
https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService.Campaign#networkSetting.
 
If you want to set that field, it would be through the CampaignService 
https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService.
 
I don't know of a simple way of retrieving keywords by *adnetworktype2 *(also 
known in the API as *networkSetting*). You would need to get the campaigns 
associated with the *AdGroupCriterion *in order to get the value of 
networkSetting 
https://developers.google.com/adwords/api/docs/reference/v201502/CampaignService.Campaign#networkSetting
.  

*Part 2: Set the max CPC bid for a keyword.*

When setting information on your *AdGroupCriterion*, you will also want to 
set a CpcBid 
https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.CpcBid.
 
Setting the bid 
https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.CpcBid#bid
 on 
the *CpcBid* will adjust the maximum CPC bid. Check out the PHP example on 
Adding 
Keywords 
https://github.com/googleads/googleads-php-lib/blob/df2725441e139950311b11eda8db564af6e4cfac/examples/AdWords/v201502/BasicOperations/AddKeywords.php
 where 
we show how to create a BiddingStrategyConfiguration 
https://developers.google.com/adwords/api/docs/reference/v201502/AdGroupCriterionService.BiddingStrategyConfiguration
 that 
contains the *CpcBid*.  

Cheers,
Nadine, AdWords API Team

On Friday, May 29, 2015 at 11:55:50 PM UTC-4, Sany Ahmed wrote:


 https://lh3.googleusercontent.com/-Jmg7jtPkKuA/VWkz_3LJK2I/ATc/T_qapLqWrL0/s1600/problem2.png
 Hi Josh,

 As you told me to make new post. this is it.

 When i downloaded keyword report two keyword with (same id + same 
 keyword_text) are withing same adgroup  but different adnetworktype2. then 
 the problem is when i am trying to set Max CPC for individual keywords with 
 different values , i am in a fix how to select my individual keywords . i 
 have attached a png here with field names

 Please help me out as you help me previously.i am looking for you helpful 
 suggestion. Thanks in advance.

 Or advice/provide some example code to add keyword Max. CPC bid for 
 experiment.

 KEYWORD FIND
 =
  //Find keyword to set experimental Max CPC
  $keyword = new Keyword($value['keyword_text'], 
 $value['keyword_match_type'], $value['id']);  // here no way to specify ad 
 network type2 like google search or search partner


 TOTAL CODE
 ==

 function AddExperimentAndSetBidMultiplier(AdWordsUser $user, $campaignId, 
 $adGroupId) {

  // Get the services, which loads the required classes.
 $experimentService = $user-GetService('ExperimentService', 
 ADWORDS_VERSION);
 $adGroupService = $user-GetService('AdGroupService', ADWORDS_VERSION);
 $adGroupCriterionService = 
 $user-GetService('AdGroupCriterionService', ADWORDS_VERSION);

 // Create experiment.
 $experiment = new Experiment();
 $experiment-campaignId = $campaignId;
 $experiment-name = 'experiment bid mulitplier for individual keyword;
 $experiment-queryPercentage = 50;

 // Set additional settings (optional).
 $experiment-startDateTime = date('Ymd His', strtotime('+1 day'));
 $experiment-endDateTime = date('Ymd His', strtotime('+1 month'));

 // Create operation.
 $experimentOperation = new ExperimentOperation();
 $experimentOperation-operand = $experiment;
 $experimentOperation-operator = 'ADD';

 $experimentOperations = array($experimentOperation);

 // Make the mutate request.
 $result = $experimentService-mutate($experimentOperations);

 // Display result.
 $experiment = $result-value[0];
 printf (Experiment with name '%s' and ID '%.0f' was added.\n, 
 $experiment-name, $experiment-id);


 // Create ad group bid multipliers to be used in the experiment.
 $adGroupBidMultipliers = new 
 ManualCPCAdGroupCriterionExperimentBidMultiplier();
 $adGroupBidMultipliers-maxCpcMultiplier = new 
 BidMultiplier($value['experiment_bid_multiplier']); //values from my 
 database


 // Create experiment data for a new experiment-only keyword.
 $adGroupCriterionExperimentData =new 
 BiddableAdGroupCriterionExperimentData();
 $adGroupCriterionExperimentData-experimentId =  
 $experiment-id; //experiment i have created on my campaign 
 now

 $adGroupCriterionExperimentData-experimentDeltaStatus = 
 'MODIFIED';