This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
var inc=0; | |
var adGroupSelector = AdWordsApp | |
.adGroups() | |
.forDateRange("ALL_TIME") | |
.withCondition("Clicks > 10") | |
.orderBy("Clicks DESC"); | |
var adGroupIterator = adGroupSelector.get(); | |
while (adGroupIterator.hasNext()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************************************************************** | |
This Google Ads script checks a single Google grants account for mandatory requirements and logs the results in a Google Spreadsheet | |
UPDATED : 23.02.2024 : Updated to v16 api + updated the adgroup counting to consider DSA (thanks Frederique Boitelle for reporting this issue). | |
Author : Suisseo (Vincent Hsu) | |
More Info : https://www.suisseo.ch/en/blog/google-ad-grants-script/ | |
1. Detect if Campaigns are set to 'maximize conversion' to allow bids higher that 2 dollars | |
2. Detect if each Campaign has at least 2 active ad groups with at least 2 active text (or at least 1 RSA) | |
3. Detect if each account has at least 2 active Sitelinks | |
4. Detect if each campaign has geo-targeting . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 . Open CMD.exe as ADMIN | |
2. Install Chocolatery : @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
https://chocolatey.org/install | |
3. Update Python : choco install python --pre | |
https://chocolatey.org/packages/python | |
4. Install Anaconda : https://www.anaconda.com/download/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Lowercase Only Version | |
function RemoveAccents(strAccents) { | |
var strAccents = strAccents.split(''); | |
var strAccentsOut = new Array(); | |
var strAccentsLen = strAccents.length; | |
var accents = 'àáâãäåòóôõöøèéêëðçÐìíîïùúûüñšÿýž'; | |
var accentsOut = "aaaaaaooooooeeeeecdiiiiuuuunsyyz"; | |
for (var y = 0; y < strAccentsLen; y++) { | |
if (accents.indexOf(strAccents[y]) != -1) { | |
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/questions/20410497/use-app-scripts-to-open-form-and-make-a-selection?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa | |
// Simulate POST to form | |
function sendHttpPost() { | |
// Copy the entire URL from <form action> | |
var formAction = "https://docs.google.com/forms/d/e/KEY/formResponse"; | |
var payload = { | |
"entry.888888888": "6689898", // Number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/google/clasp | |
npm install @google/clasp -g | |
clasp login | |
clasp clone <project id> (you should navigate in the correct file : dir (ls), cd) use clasp list to find some ids | |
clasp push | |
clasp pull | |
clasp open <project id> ( if not already defined) | |
Create an immutable version op project |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Author Wayne Burkett | |
//https://stackoverflow.com/questions/5033836/adding-console-log-to-every-function-automatically#5034657 | |
//Add console log to all existing function existing in 5he global namespace at the time of execution | |
function augment(withFn) { | |
var name, fn; | |
for (name in window) { | |
fn = window[name]; | |
if (typeof fn === 'function') { | |
window[name] = (function(name, fn) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Convert a file to an array (each line /n as an element) | |
public String[] UrlFileToArray(String fileurl){ | |
ArrayList inputFile =readFile(fileurl); | |
String urlArray[] = (String[])inputFile.toArray(new String[inputFile.size()]); | |
return urlArray; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This is used in findBalancedSets function, to reduce processing time for large sets of combinations | |
function combiLoopOptimizer(combinationsR, playerNames) { | |
var start = 0; | |
var skipRanges = []; | |
skipRanges.length = combinationsR[0].length; | |
for (var i = playerNames.length; i >= 0; i--) { | |
//size of range to skip | |
var temp = Math.floor(getTotalCombinations(i - 1, teamsize - 1)); | |
//start of range to skip |