Skip to content

Instantly share code, notes, and snippets.

Frederick Vallaeys siliconvallaeys

Block or report user

Report or block siliconvallaeys

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@siliconvallaeys
siliconvallaeys / Google Ads Experiment Dashboard (MCC multi-account)
Last active Sep 12, 2019
Create a Google Ads Experiments dashboard for multiple accounts in an MCC
View Google Ads Experiment Dashboard (MCC multi-account)
// Create a dashboard of Google Ads experiments in a Google spreadsheet
// -- MCC version
//
// Free AdWords Script courtesy of
// Optmyzr.com
// PPC tools, reports and scripts for Google, Bing, Facebook, and Amazon
//
// September 2019
@siliconvallaeys
siliconvallaeys / Google Ads Experiment Dashboard (single account)
Last active Sep 12, 2019
Get a dashboard of all the experiments in a single Google Ads account
View Google Ads Experiment Dashboard (single account)
// Create a dashboard of Google Ads experiments in a Google spreadsheet
// -- Single account version
//
// Free AdWords Script courtesy of
// Optmyzr.com
// PPC tools, reports and scripts for Google, Bing, Facebook, and Amazon
//
// September 2019
/* instructions
@siliconvallaeys
siliconvallaeys / Ad Component Report with Segments
Created Feb 13, 2019
Ad component report for Google Ads with segment data
View Ad Component Report with Segments
// Create a report in a Google spreadsheet with performance data by ad component
// Metrics for each unique headline, description, path, and visible URL are aggregated
// Use this data to find the best ad components for use in new ads or responsive search ads
// Free AdWords Script courtesy of Optmyzr.com - try Optmyzr for more PPC tools and scripts
// February 2019
function main() {
var currentSetting = {};
currentSetting.spreadsheetUrl = "NEW";
currentSetting.time = "20180101,20190201"; //"LAST_30_DAYS", "LAST_MONTH", "20180101,20181231"
@siliconvallaeys
siliconvallaeys / Ad Text N-Grams
Last active Oct 28, 2019
Get an n-gram analysis of Google Ads ad texts
View Ad Text N-Grams
/**
*
* Ad Text N-Gram Mining Tool
*
* Get aggregated metrics for when the same word sequence is used in ads across your account.
* Discover better performing phrases from all your Google Ads.
*
* Based on a script by Daniel Gilbert and BrainLabsDigital.com (https://searchengineland.com/brainlabs-script-find-best-worst-search-queries-using-n-grams-228379)
*
* Adapted by Fred Vallaeys and Optmyzr.com to work with expanded ad text rather than search terms data
@siliconvallaeys
siliconvallaeys / Ad Component Report
Last active Apr 24, 2019
Aggregated metrics for the various ad text elements used in an account
View Ad Component Report
// Create a report in a Google spreadsheet with performance data by ad component
// Metrics for each unique headline, description, path, and visible URL are aggregated
// Use this data to find the best ad components for use in new ads or responsive search ads
// Free AdWords Script courtesy of Optmyzr.com - try Optmyzr for more PPC tools and scripts
// January 2019
function main() {
var currentSetting = {};
currentSetting.spreadsheetUrl = "NEW";
currentSetting.time = "LAST_30_DAYS";
@siliconvallaeys
siliconvallaeys / Monthly Account Budgets for Bing Ads
Last active Dec 12, 2018
Pause campaigns when an account exceeds its target monthly Bing Ads budget
View Monthly Account Budgets for Bing Ads
var MAX_COST = 100000; // Max allowed account cost for the month
var MYJSONBIN = 'https://api.myjson.com/bins/xyzxyz'; // Get your own URL from http://myjson.com
var SENDGRID_API_KEY = 'SG.ghadha.xEYjNvhGEZMvfAZT4IGR7_CR73p5VU0ZC3UFasv8oys'; // Get your own API key from https://sendgrid.com
var EMAIL_ADDRESS = 'example@example.com'; // Sends notifications to this email
var EMAIL_FROM = 'example@example.com'; // Sends notifications from this email
function main() {
var account = BingAdsApp.currentAccount();
@siliconvallaeys
siliconvallaeys / Read Json for Bing Ads Scripts
Created Nov 8, 2018
Read data from a public Json data store so you can maintain state between several script runs
View Read Json for Bing Ads Scripts
function main() {
// Enter your own URI here, the same one you used when writing your data
var MyJsonBin = 'https://api.myjson.com/bins/l46me';
var options = {
method:"get",
};
var response = UrlFetchApp.fetch(MyJsonBin, options);
@siliconvallaeys
siliconvallaeys / Save Json for Bing Ads Scripts
Created Nov 8, 2018
Write JSON data to a public store for saving state about a Bing Ads Script automation - for example to create virtual 'labels'
View Save Json for Bing Ads Scripts
function main() {
// Enter your own URL here - get it from http://myjson.com
var MyJsonBin = 'https://api.myjson.com/bins/l46me';
// This is the object you will store for use the next time the script runs
var dataToStore = {};
dataToStore.lastKeywordProcessed = "some keyword";
dataToStore.someOtherThingToTrack = "the other thing's ID is 123456";
@siliconvallaeys
siliconvallaeys / Send Email With Bing Ads Scripts
Created Nov 8, 2018
Use SendGrid's API to send emails from Bing Ads Scripts
View Send Email With Bing Ads Scripts
function main() {
// Get your own SendGrid API Key from https://app.sendgrid.com/settings/api_keys
var SENDGRID_API_KEY='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';
var emailTo = "example@example.com";
var subject = "About your Bing Ads account";
var emailBody = "Now you can send emails using Bing As Scripts. Thanks Optmyzr for the code sample!";
var headers = {
@siliconvallaeys
siliconvallaeys / Bing Ads - Account Quality Score
Created Nov 7, 2018
Calculate an impression weighted quality score average for a Bing Ads PPC account
View Bing Ads - Account Quality Score
function main() {
var time = "LAST_30_DAYS";
var totalImpressions = 0;
var totalQs = 0;
var iterator = BingAdsApp.campaigns().forDateRange(time).withCondition("Impressions > 0").get();
while(iterator.hasNext()) {
var campaign = iterator.next();
You can’t perform that action at this time.