Skip to content

Instantly share code, notes, and snippets.

@BrainlabsDigital
BrainlabsDigital / Change in Campaign Spending Alert.js
Created July 25, 2018 15:01
Script to alert you if a campaign's spend has changed dramatically
/**
*
* Change in Campaign Spending Alert
*
* This script uses the current hour to calculate how much has been spent on
* individual campaigns on the day of running. The average spend up to the
* current hour in a specified numbers of days previously is averaged. If the
* spend today is higher by a specified percentage threshold an alert email
* is sent.
*
@BrainlabsDigital
BrainlabsDigital / AccountStructureChecker.js
Last active March 29, 2024 14:03
Account Structure Checker
/**
*
* Account Structure Checker
*
* This script will check your account for any missing keyword match types
* are output a report with the missing keywords
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com
*
@BrainlabsDigital
BrainlabsDigital / ExactMatchScriptUpdated.js
Created November 2, 2018 15:42
Create negatives where search queries are too dissimilar to the keywords they trigger. Based on containing the same words and/or edit distance.
/**
*
* Make Exact Match Exact
*
* Adds negatives for any search query that doesn't actually exactly match an exact
* match keyword.
*
* Version: 2.0
* Google AdWords Script maintained on brainlabsdigital.com
*
/**
*
* In-market Audiences Bidding
*
* Automatically apply modifiers to your in-market audiences based on performance.
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com
*
**/
@BrainlabsDigital
BrainlabsDigital / Search Query Mining With Quality Score.js
Last active March 29, 2024 14:03
Search Query Mining With Quality Score Tool. This script calculates the contribution of each word or phrase found in the search query report and outputs a report into a Google Doc spreadsheet.
/**
*
* Search Query Mining With Quality Score Tool
*
* This script calculates the contribution of each word or phrase found in the
* search query report and outputs a report into a Google Doc spreadsheet.
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com
*
@BrainlabsDigital
BrainlabsDigital / BudgetDepletionWarner.js
Created February 19, 2019 16:57
Sends email warnings when more than a given percentage of campaign's budgets has been spent.
function main() {
var CAMPAIGN_NAME_CONTAINS = [];
// Use this if you only want to look at some campaigns.
// For example ["Generic"] would only look at campaigns with 'generic' in the name,
// while ["Generic", "Competitor"] would only look at campaigns with either
// 'generic' or 'competitor' in the name.
// Leave as [] to include all campaigns.
var CAMPAIGN_NAME_EXCLUDES = [];
// Use this if you want to exclude some campaigns.
@BrainlabsDigital
BrainlabsDigital / CharityUnderspendingScript.js
Created March 12, 2019 09:52
Prevent grant accounts on Google Ads from underspending by activating extra keywords when the account is below budget.
/**
*
* This tool prevents your account from underspending by enabling a set of
* labeled keywords when the account's spending is below budget.
* If the account begins to spend over budget, these keywords are paused.
*
*/
function main() {
/**
*
* Extended Devices, Locations and Audiences Bidding
*
* Automatically apply modifiers to your devices, locations, in-market and remarketing audiences based on performance.
* It analyses search and display campaigns only.
*
* Version: 1.0
* Google Ads Script maintained on brainlabsdigital.com
*
/**
* Ad Copy Length Analysis
*
* Download an ad performance report for the account and break up the
* information and aggregate by component lengths. This will create a sheet for
* Headline1, Headline2, Headline3, Description1, Description2, Path1, Path2
* and Headline/Description/Path, which concatenates the respective components.
*
* Google Ads Script
* @author Brainlabs
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//Options
// Use this if you want to exclude some campaigns. Case insensitive.
// For example ["Brand"] would ignore any campaigns with 'brand' in the name,
// while ["Brand","Competitor"] would ignore any campaigns with 'brand' or
// 'competitor' in the name.
// Leave as [] to not exclude any campaigns.
var campaignNameDoesNotContain = [];