|
||||||
Thanks for providing the error screenshot. It seems that the quotes are encoded into different characters. Kindly try this syntax: "withCondition("BudgetName = 'SB1' ")" instead and let me know how it goes. You may opt to write two separate code blocks for changing the amount of the two shared budgets.
In addition, you can have the script to execute daily to check whether today is a weekday or a weekend by making use of the Date.getDay JavaScript method which returns an integer number, between 0 and 6, corresponding to the day of the week for the given date, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on., then change the budgets accordingly.
Let me know if you have questions.
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/gngmUxIxU-s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/5Y2YA000000000000000000000000000000000000000000000QQGX7J00OTvxwwn1QSSqVVNbtyHp5w%40sfdc.net.
var today = new Date(); if(today.getDay() == 1) { // Adjust Budget for a Monday } else if(today.getDay() == 5) { // Adjust Budget for a Friday } else { // Other days. Do nothing. }