Skip to content

Instantly share code, notes, and snippets.

View russorat's full-sized avatar
👋

Russ Savage russorat

👋
View GitHub Profile
/**************************************
* Track Entity Creation Date
* Version 1.3
* Changelog v1.3
* - Updated script to handle all entities
* Changelog v1.2
*  - Fixed an issue with comparing dates
* ChangeLog v1.1
*  - Updated logic to work with larger accounts
* Created By: Russ Savage
//-----------------------------------
// Update Ad Params by Ad Groups
// Version 1.0
// Created By: Russ Savage
// FreeAdWordsScripts.com
//-----------------------------------
function main() {
var SPREADSHEET_URL = "PUT SPREADSHEET URL HERE";
var spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
@russorat
russorat / Manage_Ads_Using_Excel.js
Last active April 24, 2019 06:57
This AdWords Script will allow you to manage your Ads or Creatives using GDrive and Excel. For more details, check out http://savageautomation.com/manage-your-creatives-using-excel/
/******************************************
* Manage AdWords Ads Using Excel
* Version 1.0
* 2013-09-29
* Author: Russ Savage
* SavageAutomation.com
* http://savageautomation.com/?p=121
****************************************/
var FOLDER_PATH = 'AdWordsData'; //The path where the file will be stored on GDrive
var FILE_NAME = 'creatives.csv'; //The name of the file on GDrive
@russorat
russorat / find_anomalies_script.js
Last active April 24, 2019 08:18
This is a version of the Find Anomalies in You Account script found here: http://goo.gl/IT1UcV
function Anomalies() {
/**************************************
* Find the Anomalies
* Created By: Russ Savage
* Version: 1.2
* Changelog v1.2
* - Fixed divide by 0 errors
* - Changed SIG_FIGS to DECIMAL_PLACES
* Changelog v1.1
* - Added ability to tag ad anomalies as well
@russorat
russorat / generic_script_runner.js
Last active April 24, 2019 06:56
A generic AdWords script running framework.
function main() {
//See http://goo.gl/KvINmD for an example spreadsheet.
var scriptConfigId = 'Your Spreadsheet Id Goes Here';
var sheet = SpreadsheetApp.openById(scriptConfigId).getActiveSheet();
var data = sheet.getRange('A:C').getValues();
for(var i in data) {
if(i == 0) { continue; }
var [description, location, classname] = data[i];
if(!location) { continue; }
Logger.log('Running "'+description+'" from location: '+location);
@russorat
russorat / gist:7446125
Created November 13, 2013 09:21
AdWords Script to check sitelinks
function main() {
Logger.log('AdWordsApp.extensions().sitelinks() list.');
logSitelinks(AdWordsApp);
Logger.log('Campaign and AdGroup list.');
var campIter = AdWordsApp.campaigns().get();
while(campIter.hasNext()) {
var camp = campIter.next();
logSitelinks(camp);
var agIter = camp.adGroups().get();
/*********************************************
* Automated Creative Testing With Statistical Significance
* Version 2.1
* Changelog v2.1
*   - Fixed INVALID_PREDICATE_ENUM_VALUE
* Changelog v2.0
*   - Fixed bug in setting the correct date
*   - Script now uses a minimum visitors threshold
*        per Ad instead of AdGroup
*   - Added the ability to add the start date as a label to AdGroups
@russorat
russorat / mcc-account-reporting.js
Created April 5, 2014 00:50
This script will run through all your AdWords accounts and store your data in a Google Spreadsheet.
/********************************************************************************
* This script will run through all your AdWords accounts and store your data in
* a Google Spreadsheet.
*
* @author Russell Savage <russellsavage@gmail.com>
* @version 1.0
*
* THIS SOFTWARE IS PROVIDED BY Russell Savage ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@russorat
russorat / mcc-ad-disaproval-reasons.js
Created May 30, 2014 08:27
This script will run through all your AdWords accounts and look for Ads that have been disapproved
/********************************************************************************
* This script will run through all your AdWords accounts and look for Ads that
* have been disapproved
*
* @author Russell Savage <russellsavage@gmail.com>
* @version 1.0
* FreeAdWordsScripts.com
*
* THIS SOFTWARE IS PROVIDED BY Russell Savage ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <unistd.h>
BOOL copy_to_clipboard(NSString *path)
{
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage
NSImage * image;
if([path isEqualToString:@"-"])
{
// http://caiustheory.com/read-standard-input-using-objective-c