This script uses RCurl and RJSONIO to download data from Google's API to get the latitude, longitude, location type, and formatted address
library(RCurl)
library(RJSONIO)
library(plyr)
| function main() { | |
| MccApp.accounts().withCondition("Cost > 1.00").forDateRange("YESTERDAY").withLimit(50).executeInParallel('runOnEachAccount', 'finished'); | |
| } | |
| function runOnEachAccount() { | |
| Logger.log('Starting on: '+AdWordsApp.currentAccount().getCustomerId()); | |
| var results = getAccountReport(); | |
| Logger.log(results); | |
| return JSON.stringify(results); | |
| } |
| /*********** | |
| * Collects the reporting results from all accounts | |
| * and generates a nicely formatted email. If there | |
| * are errors for an account, it includes those | |
| * in the email as well since an error in one account | |
| * won't stop the entire script. | |
| ***********/ | |
| function generateReport(results) { | |
| var NOTIFY = ['[email protected]']; | |
| var total_deleted = 0; |
| /** | |
| * | |
| * AdWords Script for checking the contents of landing pages. | |
| * Goes to the final URL of keywords or ads, then searches the source code for | |
| * user defined strings. | |
| * | |
| * Version: 1.0 | |
| * Google AdWords Script maintained by brainlabsdigital.com | |
| * | |
| **/ |
| from matplotlib import use | |
| from pylab import * | |
| from scipy.stats import beta, norm, uniform | |
| from random import random | |
| from numpy import * | |
| import numpy as np | |
| import os | |
| # Input data |
| var DEBUG = 0; | |
| function main() { | |
| var spreadsheetName = "Bid Ranges"; | |
| var spreadsheetUrl = ""; | |
| var accountManagers = ""; | |
| var overWriteOldData = 1; | |
| var sheetNames = ["Campaigns", "Keywords"]; |
| // Granular Anomaly Detector Script | |
| // | |
| // Copyright 2016 - 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 |
| // 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, |
| /** | |
| * | |
| * Ad Rotate Analysis | |
| * | |
| * This script finds the best ad in each ad group (subject to thresholds) and | |
| * calculates the performance you could have got if the impressions that went to | |
| * losing ads went to the winning ads instead. | |
| * | |
| * Version: 1.0 | |
| * Google AdWords Script maintained on brainlabsdigital.com |
| // Port of Slides API demo by Wesley Chun to Google Apps Script | |
| // Source: http://wescpy.blogspot.co.uk/2016/11/using-google-slides-api-with-python.html | |
| function slides_template() { | |
| /* | |
| from apiclient import discovery | |
| from httplib2 import Http | |
| from oauth2client import file, client, tools | |
| */ | |