Skip to content

Instantly share code, notes, and snippets.

View siliconvallaeys's full-sized avatar

Frederick Vallaeys siliconvallaeys

View GitHub Profile
@siliconvallaeys
siliconvallaeys / v1.js
Created April 14, 2016 18:50
Set AdWords Budgets To Meet Monthly Targets With Day Of Week Allocation
// Copyright 2015, Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// Granular Anomaly Detector Script
//
// Copyright 2016-2019 - Optmyzr Inc - All Rights Reserved
// Visit www.optmyzr.com for more AdWords Scripts and PPC Management Tools and Reports
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
var DEBUG = 0;
function main() {
var spreadsheetName = "Bid Ranges";
var spreadsheetUrl = "";
var accountManagers = "";
var overWriteOldData = 1;
var sheetNames = ["Campaigns", "Keywords"];
@siliconvallaeys
siliconvallaeys / Expanded Text Ad Suggestor.js
Last active December 14, 2021 12:35
Generate an AdWords bulksheet with suggestions for expanded text ads based on your landing page meta data
// Generate Expanded Text Ads From Landing Page Meta Data - AdWords Script
//
// Copyright 2016 - Optmyzr Inc - All Rights Reserved
// For more AdWords Scripts and PPC Management Tools and Reports, visit
//
// https://www.optmyzr.com/
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
@siliconvallaeys
siliconvallaeys / gist:05ddc05c019bb2430386dae9f6b66367
Created September 9, 2016 01:14
Track AdWords Account, Campaign, and Ad Group Quality Score
// Account, Campaign, and Ad Group Level Quality Score
// -------------------------------------------------
// Script created by Frederick Vallaeys
// Optmyzr - http://www.optmyzr.com http://www.optmyzr.com/enhanced-scripts-for-adwords
// Copyright 2012-2016 - Optmyzr Inc.
//
function main() {
/*
// AdWords Script: Check If Accounts Have Automatically Added Ads
// ---------------------------------------------------------------
// Copyright 2017 Optmyzr Inc., All Rights Reserved
//
// This MCC level AdWords Script reports which accounts have
// ads with the label "Added by AdWords", indicating that
// Google is automatically testing new ad variations.
// Users can then go to the impacted accounts and search for the
// label and decide whether or not to keep these new ads.
@siliconvallaeys
siliconvallaeys / Manage Stacked or Tiered Keyword Bids.js
Last active April 24, 2019 06:31
Helps find when your stacked bids by match type are not following your stratregy
/*
// AdWords Script: Check and set keyword bids for stacked (tiered) bid strategy
// -----------------------------------------------------------------------------
// Copyright 2017 Optmyzr Inc., All Rights Reserved
//
// This script helps you compare bids for the same keyword in multiple match types
// It can output just keywords for which a less restrictive match type has equal or higher bids (mode 1)
// or it can output all keywords so you can see the bids by match type (mode 2)
//
// New bids can be generated and uploaded with the spreadsheet through Bulk Uploads. The file is NOT compatible with AdWords Editor.
@siliconvallaeys
siliconvallaeys / Aggregate Spreadsheet Data By Week or Month.js
Created March 16, 2017 18:00
This Google App Script will aggregate call data from CallRail on a Google Sheet. You can use Zapier to populate data about individual calls on a Google Sheet. Then use this code to aggregate the individual call data by week or month. You may need to edit the code to match your column headers.
var AGGREGATION_RANGE = "month";
function updateAggregateData() {
var dataSheetName = "Raw Data";
var reportSheetName = "For Reports";
var timeAggregatedData = new Array();
var answeredCalls = 0;
var notAnsweredCalls = 0;
@siliconvallaeys
siliconvallaeys / Get Stats for YouTube Videos for TrueView Ads
Last active August 12, 2020 20:40
Append YouTube stats to a video placement report from AdWords to help identify videos to add as placement exclusions.
/*
// AdWords Script: Append YouTube Video Stats to Video Placement Report
// ---------------------------------------------------------------------
// Copyright 2017 Optmyzr Inc., All Rights Reserved
//
// This script adds YT statistics like 'likes,' 'dislikes,' 'comments,' etc to a Google Sheet of videos
// that your in-stream video ads have appeared on. You can then use these stats to determine when a video should
// be added as a negative placement, for example when there is too high a ratio of 'dislikes' to 'likes'.
//
// Thanks to Kris Belau from Firewood Marketing for presenting the concept at SMX West 2017.
@siliconvallaeys
siliconvallaeys / Check account is serving ads.js
Last active June 29, 2023 06:58
Check Account Is Serving Ads
/*
OPTMYZR.COM - PPC AUTOMATION AND TOOLS
---------------------------------------
Script by Optmyzr Inc. 2016-2018
This script checks whether an AdWords account has gone offline, possibly due to a declined credit card.
It does this by checking if a selected metric (like impressions) has accrued some value over a chosen
number of hours. The user can choose the number of hours to look back so that they can account for
expected periods of non-activity (e.g. due to dayparting)