Google Ads Script: Catch Midday Conversion Drops via Slack

Build a custom Google Ads script for zero conversion Slack alerts. Monitor midday drops, capture broken tracking instantly, and save wasted spend.

By AdTurbo Team · 2026-11-30

Few moments induce panic like discovering at 5:00 PM that your primary campaigns spent thousands of dollars across hundreds of clicks without logging a single conversion. Whether caused by a broken tag manager trigger, a server-side API outage, a 404 error on a critical landing page, or aggressive click fraud, waiting until the morning reporting cycle guarantees blown budgets and lost revenue.

While Google Ads provides native automated rules, they are fundamentally ill-suited for real-time operational safety. Rules run on strict intervals, struggle with complex intra-day comparison logic, and cannot natively format webhook payloads to communicate with your internal incident management tools.

In this technical guide, you will learn how to write, configure, and deploy a custom google ads script zero conversion slack alert. We will walk through the exact JavaScript code needed to parse hourly performance metrics via Google Ads Query Language (GAQL), establish statistical baseline models to prevent false positives, format incoming webhooks to Slack, and catch catastrophic conversion anomalies before your daily budget evaporates.

---

Why Real-Time Midday Alerts Beat End-of-Day Reporting

Most paid media teams rely on reactive analytics: scheduled looker studio dashboards, daily morning emails, or third-party reporting tools that refresh overnight. This architecture leaves an 8-to-12-hour blind spot where silent failures compound in cost.

The Cost of Silent Failures

Conversion tracking breaks quietly. Unlike a payment failure or an ad disapproval—which triggers an email or UI banner inside Google Ads—tracking breakages show normal account activity. Bidding algorithms (like Target CPA or Maximise Conversions) continue spending your daily budget based on their momentum. If the tracking snippet goes dead at 10:30 AM:

1. Smart Bidding drifts: The bidding algorithm interprets a sudden lack of conversion signals as low-intent traffic, rapidly cutting bids on high-value terms or shifting budget wildly into low-intent display/partner inventory.

2. Direct financial waste: If your account spends $3,000 per day, a 6-hour midday tracking outage burns $750–$1,200 on unmeasured clicks.

3. Attribution disruption: Rebuilding historical conversion data for Smart Bidding is an operational nightmare that can take weeks of manual data import to rectify.

By deploying a midday conversion drop webhook alert, your monitoring system evaluates traffic health every hour. If spend or clicks meet standard statistical thresholds while conversions remain at zero, an alert pushes immediately to your paid media team's Slack channel.

+-------------------------------------------------------------+

| Midday Outage Timeline |

+-------------------------------------------------------------+

| 09:00 AM - Dev updates checkout form / Tag breaks |

| 10:15 AM - High traffic continues; Conversions drop to 0 |

| 11:00 AM - Google Ads Script executes |

| - Flags: Spend $150 & 0 Conversions |

| - Posts JSON webhook to ppc-alerts in Slack |

| 11:05 AM - Media buyer inspects page & alerts engineering |

| Result: Problem solved in 65 mins vs 24 hours |

+-------------------------------------------------------------+

If you find yourself spending excessive time debugging broken setups or diagnosing chronic performance drops, reviewing a comprehensive PPC audit checklist can help uncover root infrastructure errors before they disrupt your campaigns.

---

The Architecture: Google Ads Scripts and Slack Incoming Webhooks

Connecting Google Ads directly to Slack without recurring SaaS middleware (like Zapier or Make) keeps your stack lean, completely free, and secure. Google Ads Scripts run directly on Google's cloud infrastructure via the V8 JavaScript engine.

How Google Ads Scripts Execute

Google Ads Scripts execute directly within your account container. They can pull real-time entity reports using the modern Google Ads Query Language (GAQL), process string/number arrays in memory, and make outbound external HTTP requests via UrlFetchApp.

Because Google Ads Scripts are completely free to run inside Google Ads, you do not need dedicated server hosting, AWS Lambda instances, or paid third-party automation tools to establish continuous account monitoring.

Setting Up a Slack Incoming Webhook

Before diving into the code, you must generate a secure destination endpoint inside your team's Slack workspace:

1. Navigate to the Slack App Directory (api.slack.com/apps) and click Create New App.

2. Select From scratch, name the app (e.g., Google Ads Traffic Monitor), and choose your engineering or marketing workspace.

3. Under Add features and functionality, click Incoming Webhooks.

4. Toggle the switch to Activate Incoming Webhooks.

5. Click Add New Webhook to Workspace at the bottom of the page.

6. Select the dedicated Slack channel where you want alerts delivered (such as google-ads-alerts or paid-ops).

7. Copy the generated Webhook URL. It will look similar to:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Treat this webhook string like an API key. Anyone who possesses this URL can post payloads directly into your chosen channel.

---

Formulating the Anomaly Logic: Preventing False Alarm Fatigue

Writing a script that blindly alerts whenever a campaign has zero conversions will destroy your team's morale within 48 hours. Early in the morning or during normal seasonal dips, natural conversion variance means an account frequently goes 30–90 minutes without logging a conversion.

To build an alert your team actually trusts, you must incorporate two critical safeguards: Click/Spend Thresholds and Hourly Run Windows.

[Script Runs (Hourly)]

|

Is Current Time within Run Window?

(e.g., 11:00 AM to 6:00 PM EST)

/ \

YES NO -- [Exit Script]

/

Fetch Campaign Metrics (TODAY)

|

Does Campaign meet Traffic Thresholds?

(Clicks 35 AND Cost $120)

/ \

YES NO -- [Ignore: Statistical Insignificance]

/

Are Conversions == 0?

/ \

YES NO -- [Healthy: Conversions Detected]

/

[Construct Slack Block Kit Payload]

|

[Send UrlFetchApp.fetch() via Webhook]

1. Setting Minimum Statistical Significance

Never check for zero conversions in a vacuum. Evaluate zero conversions conditional on spend and clicks. For example, if a campaign averages a 4% conversion rate (1 conversion every 25 clicks), encountering zero conversions after 10 clicks is statistically expected (a 66.4% probability of zero conversions occurring purely by chance).

However, if that same campaign registers 60 clicks with zero conversions, the probability of that occurring by random variance drops below 8.6%. At 80 clicks with zero conversions, the probability drops to 3.8%. That is an actionable operational anomaly.

2. Time-of-Day Gating

Avoid running anomaly alerts between midnight and 9:00 AM. In the early morning hours, ad networks rarely accumulate sufficient volume to distinguish between standard variance and true tracking loss. Anchor your script to execute between 11:00 AM and 6:00 PM in your account’s primary operating timezone.

Here is a mathematical guide to help you calibrate your script's trigger criteria:

| Typical Account CVR | Expected Clicks per Conv | Minimum Alert Threshold (Clicks) | Minimum Alert Threshold (Spend at $3 Avg CPC) | Confidence That Zero Is An Anomaly |

| :--- | :--- | :--- | :--- | :--- |

| 1.0% | 100 clicks | 180 clicks | $540 | ~83.5% |

| 2.5% | 40 clicks | 85 clicks | $255 | ~88.4% |

| 5.0% | 20 clicks | 50 clicks | $150 | ~92.3% |

| 8.0% | 12.5 clicks | 35 clicks | $105 | ~94.4% |

| 12.0% | 8.3 clicks | 25 clicks | $75 | ~95.3% |

If you find your campaign performance consistently swinging or costs escalating across all networks without clear visibility, consult our breakdown on why Google Ads is so expensive to balance your spend before setting these baselines.

---

The Complete Google Ads Script: Zero Conversion Slack Alert

Below is the complete, single-file JavaScript solution ready for production deployment. It relies on modern Google Ads Script infrastructure using AdsApp.search(), handles proper timezone offset calculations, dynamically isolates active campaigns, and constructs a polished Slack Block Kit alert payload.

javascript

/

• Google Ads Script: Real-Time Midday Zero Conversion Slack Alert

• Monitors active campaigns for spend/click thresholds with 0 conversions.

/

const CONFIG = {

// PASTE YOUR SECURE SLACK WEBHOOK URL HERE:

SLACKWEBHOOKURL: 'https://hooks.slack.com/services/YOUR/WEBHOOK/URL',

// Minimum clicks logged today before zero-conversion check applies

MINCLICKS: 40,

// Minimum cost (in account currency) logged today before checking

MINCOST: 100.0,

// Account monitoring hours (Local account time: 24-hr format)

STARTHOUR: 11, // 11:00 AM

ENDHOUR: 18, // 6:00 PM

// Optional: Exclude campaigns containing specific naming strings

EXCLUDECAMPAIGNPATTERNS: ['Test', 'Branded', 'Experiment']

};

function main() {

const now = new Date();

const timeZone = AdsApp.currentAccount().getTimeZone();

const currentHour = parseInt(Utilities.formatDate(now, timeZone, 'HH'), 10);

Logger.log('Current Account Time: ' + Utilities.formatDate(now, timeZone, 'yyyy-MM-dd HH:mm:ss'));

// Check if current hour falls within the defined operational monitoring window

if (currentHour < CONFIG.STARTHOUR || currentHour = CONFIG.ENDHOUR) {

Logger.log('Outside monitoring window (' + CONFIG.STARTHOUR + ':00 - ' + CONFIG.ENDHOUR + ':00). Exiting execution.');

return;

}

const offendingCampaigns = detectConversionDrops();

if (offendingCampaigns.length 0) {

Logger.log('Anomalies detected: ' + offendingCampaigns.length + ' campaign(s). Sending Slack alert.');

postAlertToSlack(offendingCampaigns);

} else {

Logger.log('Traffic health check passed: No campaigns meet zero-conversion anomaly criteria.');

}

}

function detectConversionDrops() {

// GAQL Query targeting active campaigns today

const query =

SELECT

campaign.id,

campaign.name,

metrics.clicks,

metrics.costmicros,

metrics.conversions

FROM

campaign

WHERE

campaign.status = 'ENABLED'

AND metrics.clicks = + CONFIG.MINCLICKS +

AND segments.date = TODAY

;

const searchResults = AdsApp.search(query);

const anomalies = [];

while (searchResults.hasNext()) {

const row = searchResults.next();

const campaign = row.campaign;

const metrics = row.metrics;

const name = campaign.name;

const clicks = metrics.clicks;

const cost = metrics.costMicros / 1000000;

const conversions = metrics.conversions;

// Verify campaign is not in the exclusion list

const isExcluded = CONFIG.EXCLUDECAMPAIGNPATTERNS.some(function(pattern) {

return name.toLowerCase().includes(pattern.toLowerCase());

});

if (isExcluded) {

continue;

}

// Evaluation: Cost exceeds threshold AND zero conversions detected

if (cost = CONFIG.MINCOST && conversions === 0) {

anomalies.push({

id: campaign.id,

name: name,

clicks: clicks,

cost: cost.toFixed(2),

conversions: conversions

});

}

}

return anomalies;

}

function postAlertToSlack(campaigns) {

const accountName = AdsApp.currentAccount().getName() || 'Unknown Account';

const accountId = AdsApp.currentAccount().getCustomerId();

let campaignListText = '';

campaigns.forEach(function(c) {

campaignListText += '• ' + c.name + '\n Spend:

+ c.cost + ' | Clicks: ' + c.clicks + ' | Conversions: 0\n';

});

const payload = {

"blocks": [

{

"type": "header",

"text": {

"type": "plaintext",

"text": "🚨 Google Ads Midday Conversion Loss Alert",

"emoji": true

}

},

{

"type": "section",

"text": {

"type": "mrkdwn",

"text": "Account: " + accountName + " (" + accountId + ")\nStatus: Significant midday spend recorded with zero conversions. Immediate review recommended."

}

},

{

"type": "divider"

},

{

"type": "section",

"text": {

"type": "mrkdwn",

"text": campaignListText

}

},

{

"type": "context",

"elements": [

{

"type": "mrkdwn",

"text": "Trigger: " + CONFIG.MINCLICKS + " clicks and

quot; + CONFIG.MINCOST + " spend with 0 tracked conversions today."

}

]

}

]

};

const options = {

'method': 'post',

'contentType': 'application/json',

'payload': JSON.stringify(payload),

'muteHttpExceptions': true

};

try {

const response = UrlFetchApp.fetch(CONFIG.SLACKWEBHOOKURL, options);

const responseCode = response.getResponseCode();

if (responseCode !== 200) {

Logger.log('Slack Webhook Error: HTTP ' + responseCode + ' - ' + response.getContentText());

} else {

Logger.log('Slack payload successfully sent.');

}

} catch (error) {

Logger.log('Critical failure making UrlFetchApp request: ' + error.toString());

}

}

---

Step-by-Step Implementation in Google Ads

Deploying a slack notification script google ads performance tracker requires five straightforward steps inside your Google Ads UI.

Step 1: Open the Scripts Workspace

1. Sign in to your Google Ads account.

2. In the top navigation, click on Tools and Settings (or the Admin/Tools icon on the new UI).

3. Under Bulk Actions, click Scripts.

Step 2: Create a New Script Container

1. Click the blue + button to create a new script.

2. In the title box at the top, rename the script to Alert - Zero Midday Conversions (Slack).

3. Delete any default placeholder code inside the text editor.

Step 3: Paste and Configure Settings

1. Copy the full script provided in the section above and paste it into the editor.

2. In the CONFIG block at lines 7–21:

• Replace 'https://hooks.slack.com/services/YOUR/WEBHOOK/URL' with the real Slack webhook you generated earlier.

• Adjust MINCLICKS and MINCOST based on your account's specific unit economics.

• Confirm the STARTHOUR and ENDHOUR match your primary business day operations.

Step 4: Authorize and Preview

1. Click the Authorize button in the bottom right corner of the editor window. A Google pop-up will request permissions allowing the script to read your campaign data and send outbound network requests via UrlFetchApp.

2. Click Preview. The script will run inside a sandbox environment without altering any settings.

3. Review the Logs tab at the bottom. You should see execution timestamps displaying your current account time and confirmation of whether your parameters triggered an alert.

Step 5: Schedule Hourly Frequency

1. Click Save in the bottom right.

2. Click the back arrow to return to the main Scripts overview table.

3. Find your newly created script, look under the Frequency column, and click the edit pencil icon.

4. Change the execution schedule to Hourly.

Your account is now guarded by real-time conversion monitoring every 60 minutes between 11:00 AM and 6:00 PM local time.

---

Advanced Customization: PMax, Competitive Pressures, and Multi-Account MCCs

While the baseline script monitors standard Search and Display campaigns out of the box, enterprise accounts often require specialized monitoring extensions. Here are three advanced architectural modifications.

1. Filtering Performance Max (PMax) Campaigns

Performance Max campaigns behave differently than standard Search. They allocate budget across Shopping, Search, Video, and Display surfaces simultaneously. In some lead generation verticals, click surges occur due to accidental Display/Audience expansion. To monitor or isolate Performance Max explicitly, you can adjust the GAQL WHERE clause to filter by advertisingchanneltype:

sql

-- Specifically target only Performance Max campaigns

WHERE

campaign.status = 'ENABLED'

AND campaign.advertisingchanneltype = 'PERFORMANCEMAX'

AND metrics.clicks = 50

AND segments.date = TODAY

If you prefer tracking both while identifying them inside Slack, modify your Slack loop to inspect campaign.advertisingChannelType and label the alert block with a custom PMax tag.

2. Monitoring Sudden Auction Shifts (Competitor Incursions)

Sometimes conversions drop to zero not because your tag is broken, but because an aggressive competitor launched a flash promotion or drastically increased bids, squeezing out your top positions. When this happens, your Search Impression Share (Top %) and Search Lost IS (Rank) diverge rapidly.

+--------------------------------------------------------------+

| Auction Metric Diagnostic Indicator |

+--------------------------------------------------------------+

| Condition A: Zero Conversions + High Impression Share Rank |

| - Indicates broken checkout/landing page |

| |

| Condition B: Zero Conversions + Low Absolute Top Impression %|

| - Indicates outbid by competitors / Bid drop |

+--------------------------------------------------------------+

To alert on this in your daily reporting, pull competitive signals by auditing your weekly competitive baseline using a structured Google Ads optimization checklist.

3. Adapting the Script for Multi-Account Manager (MCC) Setups

If you manage multiple accounts within an agency or enterprise brand umbrella, running this script on every single account becomes difficult to manage. You can wrap this logic inside an MCC-level script using AdsManagerApp.accounts().executeInParallel() or account iterators:

javascript

function main() {

const accountIterator = AdsManagerApp.accounts()

.withLimit(50)

.get();

while (accountIterator.hasNext()) {

const account = accountIterator.next();

AdsManagerApp.select(account);

// Run standard detection logic inside the child account container

const issues = detectConversionDrops();

if (issues.length 0) {

postAlertToSlack(issues);

}

}

}

If manual script maintenance across dozens of accounts drains your engineering bandwidth, exploring dedicated Google Ads automation tools can handle proactive multi-account diagnostics without manual script maintenance.

---

Troubleshooting: What to Check When the Alert Fires

When a midday zero-conversion Slack notification appears, follow this systematic triage sequence to diagnose and resolve the issue quickly:

[Slack Alert Received: Zero Conversions]

|

[Step 1: Check Live Landing Pages]

Can you complete a real transaction?

/ \

YES NO -- [Dev Error: Fix 500/Form Error]

/

[Step 2: Inspect Browser Network Tab]

Does GTM container fire the conversion tag?

/ \

YES NO -- [Tagging Error: Restore Trigger]

/

[Step 3: Review Search Terms Report]

Did traffic shift to completely irrelevant queries?

/ \

YES NO -- [Step 4: Check Payment Gateway]

/ Is Stripe/PayPal down globally?

[Add Negative Keywords]

Step 1: Live Form and Checkout Verification

Immediately visit the landing page URL associated with the alerting campaign using an incognito window. Perform a complete, live test conversion (fill out the lead capture form or buy a test item with a test credit card).

• Did the form fail to submit?

• Did an unhandled JavaScript exception occur in the console?

• Is the payment gateway returning an upstream 502/504 gateway timeout?

Step 2: Google Tag Manager & Consent Mode Diagnostics

Open the site using Google Tag Assistant (tagassistant.google.com). Verify whether the Google Ads Conversion Tag or GA4 Conversion Event is successfully triggered on the confirmation action.

In recent quarters, silent conversion drops frequently stem from Google Consent Mode v2 updates. If your cookie consent banner platform (CMP) updates or experiences an API misconfiguration, it may classify all users as rejecting advertising cookies (adstorage='denied'), immediately blocking conversion data from flowing into Google Ads.

Step 3: Search Terms and Click Hijacking

If the website is functioning correctly, verify whether an influx of low-intent queries drained your budget. Run through your search terms immediately to ensure match type leakage didn't push your ads into irrelevant traffic. If you identify unexpected keyword patterns, review our walk-through on how to use the Google Ads Search Terms report to cut wasted spend to quickly clean up your targeting.

Step 4: Upstream API and Webhook Failures

For business models relying on offline conversion imports or CRM-based conversions (e.g., Salesforce, HubSpot, or custom webhook integrations), check your server logs. A broken webhook endpoint or expired OAuth refresh token between your server and the Google Ads API will present as an immediate, midday conversion flatline.

---

Beyond Basic Scripts: Autonomous Anomaly Detection

While Google Ads Scripts provide a reliable first line of defense, they carry inherent architectural limitations:

• API Quota Restrictions: Scripts running hourly can hit execution timeouts or Google API rate limits in high-volume accounts.

• Binary Decision Logic: Simple threshold rules (e.g., clicks 40) do not adjust dynamically for day-of-week fluctuations, seasonal consumer behavior, or regional holidays.

• Maintenance Overhead: Webhook schemas, API endpoints, and deprecated JavaScript engines require regular engineering upkeep.

Teams seeking automated monitoring without managing custom code, webhooks, and manual script updates can leverage AdTurbo. AdTurbo operates continuously in the background, analyzing multi-dimensional conversion patterns, bid anomalies, and search term distributions across your Google Ads accounts. Rather than just alerting you when things break, an autonomous Google Ads AI agent identifies conversion drops, evaluates root causes across campaigns, and takes programmatic action to protect your budget.

---

Related Guides

• Google Ads Optimization Checklist: 15 Things to Check Every Week

• PPC Audit Checklist: 12 Steps to Fix a Leaking Google Ads Account

• Google Ads Not Working? 11 Things to Check Before You Panic

---

Frequently Asked Questions

Is Google Scripts free to use in Google Ads?

Yes, Google Ads Scripts are completely free and included within every standard and Manager (MCC) Google Ads account. You can create, test, and run scripts on automated hourly or daily schedules without paying any infrastructure or hosting fees.

Why am I getting clicks on my Google Ads but no conversions?

Clicks without conversions typically point to technical issues like broken conversion tags or non-functioning form fields. Other common causes include landing page 404 errors, poorly targeted broad match keywords eating up budget, or unoptimized mobile user experiences.

How do I set up alerts for conversion drops in Google Ads without code?

You can configure native Google Ads automated rules to email you if cost exceeds a set dollar amount while conversions equal zero. However, native rules lack direct webhook connectivity to tools like Slack and provide fewer conditional filtering options compared to custom scripts.

Can this Google Ads Slack script track multiple campaigns simultaneously?

Yes, the script queries all active campaigns across your account in a single operation. Any campaign that exceeds your click and spend criteria while logging zero conversions is bundled into a clean, formatted Slack Block Kit alert.

Google Verified Fully Automated

Get More Leads & Sales From Google Ads — On Autopilot

AdTurbo is your AI Google Ads agent, built by top Google Ads agency owners. AdTurbo works tirelessly in the background managing your Google Ads to get more leads and sales, while you focus on running your business.

Sign up with Google

7-day free trial. No contracts. Cancel anytime.