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() { | |
| /****************************************** | |
| * PMax Search Terms Report | |
| * @version: 1.0 | |
| * @authors: Frederick Vallaeys (Optmyzr) | |
| * ------------------------------- | |
| * Install this script in your Google Ads account (not an MCC account) | |
| * to generate a spreadsheet containing the search terms in your Performance Max campaigns. | |
| * The spreadsheet also includes data about category labels (groupings of search terms). | |
| * Metrics include conversion value, conversions, clicks, and impressions |
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
| /****************************************** | |
| * RSA Report | |
| * @version: 3.0 | |
| * @authors: Naman Jindal (Optmyzr), Frederick Vallaeys (Optmyzr) | |
| * ------------------------------- | |
| * Install this script in your Google Ads account (not an MCC account) | |
| * to generate a Google Sheet with a list of all your responsive search ads | |
| * and their headlines and descriptions. | |
| * For RSAs that are not using the maximum number of allowed variations, | |
| * this script will suggest new variations for headlines and descriptions |
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
| /****************************************** | |
| * GPT Connector for Google Ads | |
| * @version: 1.0 | |
| * @authors: Naman Jindal (Optmyzr), Frederick Vallaeys (Optmyzr) | |
| * ------------------------------- | |
| * This function can be used to make a call to openAI's GPT in a Google Ads script. | |
| * Use it to send prompts to GPT that include context about a Google Ads account. | |
| * For example, you can send campaign data from Google Ads as part of a prompt that | |
| * generates a text string with a summary of the account changes and performance. | |
| * -------------------------------- |
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
| const SETTINGS = { | |
| SHEET_URL:"https://docs.google.com/spreadsheets/d/1mi6dG2N-qHPvmtYkA6AzFzI4BcnopDBennlAOw6iwk8/copy", | |
| DAYS: 7, | |
| CAMPAIGN_STATUS: 'ENABLED',// ENABLED | PAUSED | ALL | |
| CAMPAIGN_NAME_INCLUDE: "", | |
| CAMPAIGN_NAME_EXCLUDE: "", | |
| CAMPAIGN_LABEL_INCLUDE: "", | |
| CAMPAIGN_IDS: [], | |
| MIN_CLICKS: 1, | |
| MIN_IMPRESSIONS: 0, |
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
| from bs4 import BeautifulSoup | |
| import re | |
| from html import unescape | |
| html = input_data.get('items', '') or '' | |
| html = unescape(html) | |
| def normalize_lines(text: str): | |
| text = re.sub(r'<\s*br\s*/?\s*>', '\n', text, flags=re.IGNORECASE) | |
| text = re.sub(r'<[^>]+>', '', text) |
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() { | |
| // Set up the output sheet | |
| var outputSheet = setUpOutputSheet(); | |
| // Replace with the URL of your input Google Sheet | |
| const SPREADSHEET_URL = ''; // Add the URL of the same Google Sheet as in the first script | |
| const sheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL).getActiveSheet(); | |
| // Fetch all keywords from active campaigns and store in a data structure | |
| const keywordsMap = fetchAllKeywords(); |
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
| /****************************************** | |
| * Trending Search Terms Blog Idea Generator | |
| * @version: 1.0 | |
| * @author: | |
| * - Frederick Vallaeys (Optmyzr) | |
| * -------------------------------- | |
| * Install this script in your Google Ads account (not an MCC account) | |
| * to identify trending search terms based on significant impression growth. | |
| * The script finds search terms that have at least a minimum number of impressions | |
| * in the past 7 days and have either increased by a specified multiplier compared to |
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
| /************************************************* | |
| * Placement Exclusion | |
| * @version: 1.0 | |
| * @author: Naman Jindal (Optmyzr) | |
| * ------------------------------- | |
| * Visit Optmyzr.com for PPC management tools and scripts | |
| * including Rule-based automations, Reports, Audits, Team workflows, | |
| * and optimization suggestions. | |
| * ------------------------------- | |
| * Note Google limits placement (content) exclusions that may |
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
| /** | |
| * | |
| * 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 |
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 units = "metric"; // imperial or metric | |
| var lat = "37.384998"; | |
| var lon = "-122.106689"; | |
| var openWeatherAPIKey = ""; // get your own key for the One Call API from https://openweathermap.org/api | |
| var campaignName = 'Search: Executive Summary Report'; // put your campaign name here | |
| var bidAdjustment = 1.5; // this is the scaling factor of the current tROAS | |
NewerOlder