Back to Help

Advanced Configuration

Power user settings and customizations for the MCC PMax script.

Warning: These settings affect script performance and timeout risk. Only change them if you understand the trade-offs. Always test on a copy first.

MAX_INIT_PER_RUN

const MAX_INIT_PER_RUN = 3;

Location: Line 61 in the script

What it does:

Controls how many uninitialized accounts are processed per hourly run. Default is 3.

When to change:

  • • Increase (5-10) if your accounts are small with little data
  • • Decrease (1-2) if you're getting timeout errors
  • • Increase to speed up initial setup (risky)

Trade-offs:

Higher value:

  • ✓ Faster initialization (all accounts ready sooner)
  • ✗ Higher timeout risk (script may fail mid-run)

Lower value:

  • ✓ Safer (less timeout risk)
  • ✗ Slower initialization (takes more hours)

PLACEMENT_LIMIT

const PLACEMENT_LIMIT = 50000;

Location: Line 91 in the script

What it does:

Maximum number of placement rows to fetch per account, ordered by impressions (highest first). Default is 50,000.

When to change:

  • • Increase (100,000+) if you need more placement data and can risk timeouts
  • • Decrease (10,000-25,000) if you're getting timeout errors on placement queries

Important:

The minPlaceImpr filter in your sheet (default: 10 impressions) applies AFTER fetching. So PLACEMENT_LIMIT controls API query size, minPlaceImpr controls final output.

MAINTENANCE_HOUR

const MAINTENANCE_HOUR = 23;

Location: Line 83 in the script

What it does:

Hour (0-23, MCC timezone) when the script collects historical data instead of processing individual accounts. Default is 23 (11pm).

When to change:

  • • Set to a low-traffic hour for your business
  • • Avoid hours when you have many accounts scheduled to run
  • • Consider timezone implications for global teams

RUN_ASSET_FATIGUE_ANALYSIS

const RUN_ASSET_FATIGUE_ANALYSIS = false;

Location: Line 85 in the script

What it does:

When enabled (true), analyzes asset performance over time to identify fatigue. Default is false.

Performance impact:

Adds 30-60 seconds per account. Only enable if you actively use this data.

REFRESH_ALL_TAB

const REFRESH_ALL_TAB = false;

Location: Line 52 in the script

What it does:

When true, refreshes the 'all' tab during maintenance hour with current account data. Default is false.

When to enable:

  • • You've added new accounts to your MCC
  • • You want updated cost/campaign counts
  • • You're planning to add more accounts to settings

Important:

Set back to false after one run to avoid unnecessary processing.

Custom Run Time Strategies

The default distribution (15 accounts per hour starting at 03:00) works for most users, but you can customize:

Distribute by account size:

  • • Large accounts (high spend, many campaigns): Spread across hours
  • • Small accounts (low spend): Can group more per hour

Time zone considerations:

  • • Run times use MCC timezone, not account timezone
  • • For global MCCs, consider scheduling around business hours

Peak vs off-peak:

  • • Schedule large accounts during off-peak hours (1-6am)
  • • Avoid the maintenance hour (23:00 by default)

Adding Accounts After Initial Setup

To manually add an account that wasn't auto-populated:

  1. 1. Find the account in the 'all' tab
  2. 2. Copy the Account ID and Name
  3. 3. Add a new row to the bottom of the 'settings' tab
  4. 4. Fill in:
    • • Column A: Account ID
    • • Column B: Account Name
    • • Column C: Run At hour (choose one with space)
    • • Column D: FALSE (unless lead gen)
    • • Column G: TRUE if Demand Gen campaigns exist
    • • Column O: FALSE (will initialize on next run)
  5. 5. The account will be processed within 3 hours (depending on initialization queue)

DEBUG_LOGS_ON

const DEBUG_LOGS_ON = false;

Location: Line 54 in the script

What it does:

Enables verbose logging including execution times, detailed processing steps, and debug information.

When to enable:

  • • Troubleshooting performance issues
  • • Diagnosing timeout problems
  • • When contacting support (include logs)

Note:

Increases log size. Disable after troubleshooting.

Need Help?

If you're unsure about any of these settings, ask in the community first before making changes.