Call asset scheduling
This script ensures that call extensions are only active during the specified business hours, potentially improving ad performance by aligning callouts with times when the business is open and can respond to inquiries.
To set up this script, follow these steps:
Open your Google Ads account.
Go to the "Tools & Settings" menu and select "Scripts".
Click the "Create" or "+" button to create a new script.
Copy and paste the following script.
function main() {
// Define the schedule for regular business hours
var businessHoursSchedule = [
{dayOfWeek: "MONDAY", startHour: 8, startMinute: 0, endHour: 17, endMinute: 0},
{dayOfWeek: "TUESDAY", startHour: 8, startMinute: 0, endHour: 17, endMinute: 0},
{dayOfWeek: "WEDNESDAY", startHour: 8, startMinute: 0, endHour: 17, endMinute: 0},
{dayOfWeek: "THURSDAY", startHour: 8, startMinute: 0, endHour: 17, endMinute: 0},
{dayOfWeek: "FRIDAY", startHour: 8, startMinute: 0, endHour: 17, endMinute: 0}
];
// Select all call assets
var callAssets = AdsApp.extensions().callouts().get();
while (callAssets.hasNext()) {
var callAsset = callAssets.next();
// Update schedules to the defined business hours
callAsset.setSchedules(businessHoursSchedule);
}
}
Replace the start hours and end hours.
Save the script.
Review and authorize the script to access your Google Ads and Google Sheets accounts.
Run the script manually for the first time to populate the initial values in the spreadsheet.
(Optional) Schedule the script to run on a specific cadence (ie: daily, weekly, monthly, etc.)
Note: Ensure that you have the necessary permissions to access and modify the target Google Spreadsheet.
Last updated