Skip to content

Instantly share code, notes, and snippets.

View richardscottclark's full-sized avatar

Scott Clark richardscottclark

View GitHub Profile
@richardscottclark
richardscottclark / gist:d7a1a7440a44a9857ef93b59e0690af4
Last active February 17, 2025 19:25
How to use labels to selectively process child accounts with MCC
/**
* Minimal example: Process MCC child accounts based on an account label.
*
* This script retrieves all child accounts that do NOT have the "Processed" label,
* processes each one (here, simply logging its customer ID), and then applies the
* "Processed" label to mark it as done.
*/
function main() {
var labelName = 'Processed';
@richardscottclark
richardscottclark / gist:93d4a99b8c000d405d065e8ff92d98af
Created February 13, 2025 16:05
Google Ads System-Added Sitelinks Check
// Global variables
var EMAIL_ADDRESS = "youremail@youremaildomain.com";
var DATE_RANGE = "LAST_7_DAYS";
/*
Possible DATE_RANGE values for the segments.date DURING clause:
Predefined Date Ranges:
- "TODAY": Data for the current day.
- "YESTERDAY": Data for the previous day.