I am trying to write a script where for two specific keywords, I turn them both ON and then both OFF in alternating hours for six weeks in a specific country. All users should be able to see these ads when the keywords are on, and no users should be able to see them when they are off. So the rhythm should be:
Monday 00:00 - 00:59 Keywords ON 01:00 - 01:59 Keywords OFF 02:00 - 02:59 Keywords ON
Tuesday 00:00 - 00:59 Keywords OFF 01:00 - 01:59 Keywords ON 02:00 - 02:59 Keywords OFF
And so on. If this routine is followed, Monday on week 2 should start with keywords OFF from 00:00 - 00:59 and so on.
I only have some javascript experience and am totally new to google ads specifically, so I'm a bit afraid of just implementing my script without prior consulting someone else.
Also happy to hear about any best practices or a way I can test out my script before actually implementing it!
It also feels needlessly complicated as of right now. Here's what I have so far:
Hi,
Thank you for reaching out to the Google Ads Scripts support team.
To test a script functionality, you can preview the script so that it will log any errors without applying the changes to the account. You may refer to the Preview Mode guide for more information. Also, you can refer to the Best Practices document to execute a script effectively. Additionally, you can go through Working with Dates and Times, Keywords, and AdsApp.Keyword documents for reference.
I would like to inform you that our team is focused on guiding users to troubleshoot specific issues within their own scripts, rather than providing hands-on implementation or creating scripts on a user's behalf.
I hope this helps! Feel free to get back to us with the following details for any further issues.