Re: is there a way to bid adjust on time or date?

2018-02-19 Thread Ken Dan Tinio
Thank you so much for providing me this answer. I have just figure it all 
out as well. We have the same code. Thank you! thank you!

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/68dd8ec5-f425-45d2-aaf9-bd8d71e5ace3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-19 Thread 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
Hi Ken,

Since your main goal is to add an AdSchedule, then you need to use the ADD 
operator in your mutate() 

 method 
as well as setting the criterion as AdSchedule instead of Platform. Also, 
you cannot set the startHour's 

 value 
as 24 as this will generate an error since the field accepts 0 -23 values. 
Below 
is the code snippet that works on my end that you can use as reference:

$adsched = new AdSchedule();
$adsched->setDayOfWeek(DayOfWeek::MONDAY);
*$adsched**->setStartHour(14);*
$adsched->setStartMinute(MinuteOfHour::ZERO);
$adsched->setEndHour(24);
$adsched->setEndMinute(MinuteOfHour::ZERO);

// Create a criterion with modified bid.
$criterion = new CampaignCriterion();
$criterion->setCampaignId($campaignId);
*$criterion**->setCriterion($adsched);*
$criterion->setBidModifier($bidModifier);

// Create a campaign criterion operation and add it to the operations list.
$operation = new CampaignCriterionOperation();
*$operation**->setOperator(Operator::ADD);*
$operation->setOperand($criterion);
$operations = [$operation];

Try this on your end and let me know if this works.

Thanks,
Vincent
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1709e2d0-8e85-4425-8149-81921b24a018%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-19 Thread Ken Dan Tinio
So far I have this..



class SetBidModifier {

  const CAMPAIGN_ID = '1010615735';
  // Bid modifiers are float number, not percentages, e.g., 1.5 means 50% 
more
  // bidding.
  const BID_MODIFIER = '1.5';

  public static function runExample(AdWordsServices $adWordsServices, 
AdWordsSession $session, $campaignId, $bidModifier) 
  {
$campaignCriterionService = $adWordsServices->get($session, 
CampaignCriterionService::class);

// Create a mobile platform. The ID can be found in the documentation.
// https://developers.google.com/adwords/api/docs/appendix/platforms
$mobile = new Platform();
$mobile->setId(30001); // HighEndMobile = 30001

$adsched = new AdSchedule();
$adsched->setDayOfWeek(DayOfWeek::MONDAY);
$adsched->setStartHour(24);
$adsched->setStartMinute(MinuteOfHour::ZERO);
$adsched->setEndHour(24);
$adsched->setEndMinute(MinuteOfHour::ZERO);


// Create a criterion with modified bid.
$criterion = new CampaignCriterion();
$criterion->setCampaignId($campaignId);
$criterion->setCriterion($mobile);
$criterion->setBidModifier($bidModifier);

// Create a campaign criterion operation and add it to the operations 
list.
$operation = new CampaignCriterionOperation();
$operation->setOperator(Operator::SET);
$operation->setOperand($criterion);
$operations = [$operation];

// Update campaign criteria on the server.
$results = $campaignCriterionService->mutate($operations);

// Print out some information about the updated campaign criterion.
foreach ($results->getValue() as $campaignCriterion) {
  printf(
  "Campaign criterion with campaign ID %d, criterion ID %d, "
  . "and type '%s' was modified with bid %.2f.\n",
  $campaignCriterion->getCampaignId(),
  $campaignCriterion->getCriterion()->getId(),
  $campaignCriterion->getCriterion()->getType(),
  $campaignCriterion->getBidModifier());
}
  }

  public static function main() 
  {
// Generate a refreshable OAuth2 credential for authentication.
$oAuth2Credential = (new OAuth2TokenBuilder())
->fromFile()
->build();

// Construct an API session configured from a properties file and the 
OAuth2
// credentials above.
$session = (new AdWordsSessionBuilder())
->fromFile()
->withOAuth2Credential($oAuth2Credential)
->build();
self::runExample(new AdWordsServices(), $session, 
intval(self::CAMPAIGN_ID), floatval(self::BID_MODIFIER));
  }
}


I just don't know how to pass the ad schedule to mutate.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4e9b3104-fbc2-4a55-b19b-1d3802f70565%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-19 Thread Ken Dan Tinio
Thank you very much Vincent, I think this is the one that I'm looking for.

we can set startHour, startMinute, dayOfWeek, endHour and endMinute.

Ive check the example, I don't know which one to replace. I know I will be 
asking too much but, I don't really know how to use it. Can you please 
provide me an example. Please...

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6df89fb2-2b12-4971-9dbf-5b295c3a7865%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-19 Thread 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
Hi Ken,

Yes, AdSchedule 

 is 
available in the AdWords API in the campaign level only particularly in the 
CampaignCriterion 

 object. 
However, ad scheduling 
 is used to show 
your ad on a particular day and time. So if your goal is to *always show 
your campaigns* and just change the bids on a particular day and time, then 
AdSchedule is not appropriate for your use-case.

However, if your main goal is to *show your ads only on a particular 
schedule* and set the bids when your ads will be shown via bidModifier 

 field, 
then AdSchedule is perfect for your use-case. You can check this example 

 on 
how to set the bid modifier and you can just change the object being used. 

Thanks,
Vincent
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b9d89c15-cf56-403a-91a9-4db4e030d533%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-19 Thread Ken Dan Tinio
is ad schedule available in the API?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b597c788-e9c7-446c-a43a-74e1e75f30b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-19 Thread 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
Hi Ken,

You cannot access your AdWords Scripts via the AdWords API as they are of 
completely different implementations. You can run the AdWords Scripts via 
the AdWords UI only and the AdWords API can be ran via different 
platforms/applications.

Thanks,
Vincent
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/f989d72d-59e4-4e38-83bc-571a956b493f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-19 Thread Ken Dan Tinio
How can I access my scripts via API? The scripts are really interesting. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/00426070-16f1-4a67-a23b-20f22632f7fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way to bid adjust on time or date?

2018-02-18 Thread 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
Hi Ken,

Are you referring to adjusting/setting bids based on a certain schedule? 
For example, if the day is Saturday, and the time is 5 pm to 7 pm, then you 
need to adjust/increase the bids. Is my assumption to your use-case 
correct? If so, then scheduling is not yet supported in the AdWords API. This 
said, you will need to manually implement a scheduling feature to update 
your bids. Another recommendation would be to search other forums if there 
is a possible cron job that you can integrate with the current supported 
client libraries of the AdWords API.

As an alternative, you can also use AdWords Scripts 
 as 
scheduling is supported in scripts. If you have clarifications regarding 
AdWords Scripts, you can post in this forum 
.

Thanks,
Vincent
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5c669429-a6a2-4bd6-899b-8d26aa794e7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.