Skip to content

Instantly share code, notes, and snippets.

/******************************************
* Newly Disapproved Products
*
* Google Ads Script for identifying newly disapproved in Google Merchant Center,
* if product has clicks before
*
* Created by: Dmytro Tonkikh, chiliad & TrueClicks
*
* Telegram channel : t.me/adwordsscripts
* Websites : https://adsapp.report
var fullReport = [];
function main() {
// enter your spreadsheet url and sheet name
let sheetUrl = ''; // enter spreadsheet URL between the quotes
let sheetName = 'Sheet1'; // enter sheet name between the quotes
// don't touch code below this line
// =================================
@tonkikh
tonkikh / MCC Quality Score Tracker v3.0.1.js
Last active May 6, 2022 12:29
MCC Quality Score Tracker v3.0.1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* MCC Quality Score Tracker v3.0.1
* Written by Martin Roettgerding.
* © 2016 Martin Roettgerding, Bloofusion Germany GmbH.
* www.ppc-epiphany.com/qstracker/latest
*
* Modified by Dmytro Tonkikh, chiliad LLC, Ukraine
* https://chiliad.agency
* version for MCC account
*/
@tonkikh
tonkikh / convertExcel2Sheets
Created October 26, 2020 21:09 — forked from azadisaryev/convertExcel2Sheets
Google Apps Script for converting Excel (.xls or .xlsx) file to Google Spreadsheet. Drive API must be enabled in your script's Advanced Google Services and in Developers Console for the script to work (see https://developers.google.com/apps-script/guides/services/advanced#enabling_advanced_services for details).
/**
* Convert Excel file to Sheets
* @param {Blob} excelFile The Excel file blob data; Required
* @param {String} filename File name on uploading drive; Required
* @param {Array} arrParents Array of folder ids to put converted file in; Optional, will default to Drive root folder
* @return {Spreadsheet} Converted Google Spreadsheet instance
**/
function convertExcel2Sheets(excelFile, filename, arrParents) {
var parents = arrParents || []; // check if optional arrParents argument was provided, default to empty array if not
@tonkikh
tonkikh / seoprofy_price_in_stock.js
Created December 5, 2019 14:08
Script for stopping ads out of stock and set param1 for available SKU. Bug Fix.
var URL_LEVEL = 'Ad'; // Ad or Keyword
var ONLY_ACTIVE = false; // set to false for all ads or keywords
var CAMPAIGN_LABEL = ''; // set this if you want to only check campaigns with this label
var STRIP_QUERY_STRING = true; // set this to false if the stuff that comes after the question mark is important
var WRAPPED_URLS = true; // set this to true if you use a 3rd party like Marin or Kenshoo for managing you account
// This is the specific text to search for
// on the page that indicates the item
// is out of stock.
var LABEL_NAMES = ['"test"'];
var OUT_OF_STOCK_TEXT = 'out of stock';
@tonkikh
tonkikh / Remarketing Audiences Creations
Created August 12, 2019 12:15
Remarketing Audiences Creations
function main() {
var settings = {'linkedView':"XXXXXXXX",
'linkedAccountId':"XXX-XXX-XXXX",
'accountId':'XXXXXXX',
'propertyID':'UA-XXXXXXX-X'};
//Example spreadsheet https://goo.gl/4ZAb7Z, make copy and paste instead
var spreadsheet = SpreadsheetApp.openByUrl('https://goo.gl/4ZAb7Z');
var sheet = spreadsheet.getSheetByName('Sheet1');
var range = sheet.getRange(2, 1, sheet.getLastRow(), 3);
/** Highest positive signed 32-bit float value */
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */
const base = 36;
const tMin = 1;
const tMax = 26;
const skew = 38;
const damp = 700;
const initialBias = 72;
@tonkikh
tonkikh / Advanced Broken Url Checker
Last active July 30, 2019 14:12
AdWords script for checking ads with broken URL.
/******************************************
* Advanced Broken Url Checker
*
* Version 1.1
*
* Created by: Dmytro Tonkikh
*
* m.me/dmytro.tonkikh
* t.me/dtonkikh
* t.me/adwordsscripts
/**
*
* Campaign Budget Overspend Monitoring
*
* Этот скрипт отмечает ярлыками кампании, которые перетратели свой дневной бюджет.
* Опционально, он также может выключать эти кампании, если они потратили слишком много.
* Вам прийдет оповещение на почту, если будут новые отмеченные ярлыком кампании.
* Когда бюджет более не перерасходуется, кампании возобновяться и удаляться ярлыки.
*
* Version: 1.0
@tonkikh
tonkikh / YouTube Channels Cleaner 2.0
Created March 26, 2017 15:16
Adwords Script to filter YouTube channels by video tags
/******************************************
* YouTube Channels Cleaner
*
* Version 2.0
* Date 25.03.2017
*
* Created by: Dmytro Tonkikh
******************************************/
var dataFile = "videoIds.txt";