Connect with us

GOOGLE

Google Ad Script to Manage Campaign Budgets

Published

on

google ad script to manage campaign budgets

Today as advertisers utilizing Google Ads, it is a universal struggle to manage to a specific budget by campaign(s). Your options in the U.I. are singular: set a rule that excludes hourly. My question is why? Would it not be great to have a script to manage at the campaign level, via a sheet in 2019? It took some time but I figured it out, which you will see below. The ability to manage budgets in a single script with a sheet across multiple campaigns.

Before we continue onto the script, if you are set on rules not to say they are not great for budget management, here is an example of how to create a rule that has time setting limitations to pause or enable your campaigns based on a budget for campaigns. You can find additional details here with automated rules.

  1. Sign in to your Google Ads account.
  2. Go to the CampaignsAd Groups, or Keywords pages.
  3. Click the 3-dot icon above the statistics table.
  4. Select Create an automated rule.
  5. Select Pause or Enable from the “Type of rule” drop-down.
  6. Choose which Campaign Type
  7. To add a condition, click +ADD, under “Condition”.
  8. Define the frequency of your rule which is Once, Daily, Weekly or Monthly.
  9. Choose the type of email updates you’d like to receive on issues affecting your rule.
  10. Name your rule.
  11. Click Preview to ensure you’ve set up your rule to run the way you want. Previewing is just for verification and doesn’t make any permanent changes to your account.
  12. When you are done, click Save rule.

There are benefits to rules, in my mind for budget sake, not so extremely valuable. So that leaves us with paying for tools & or having a developer or engineer to build out some fancy scripts or internal platform that works with Google’s API. What if I do not have access to those resources and all I want to do is be an advertiser? I cannot, I have to learn coding and API stuff to include staying up-to-date on all of the U.I. changes and enhancements, which you can find in the PPC Hero Library.

Why you are reading and how the script works.

This script manages your budget at the campaign level by the hour via a google sheet, so you can scale. To my knowledge and I have scoured the web, this is the first for the public. I did not write the original script. Which can be found here by Google. I simply deleted a bunch of stuff with lots of trial and error over a 1 year period of time and re-worked a few things to get it to manage budgets instead of bids.

The script allows you the flexibility of setting your budgets and forgetting about them within reason. If you want to get crazy, you can do what I do and use this script with the pacing script with few custom google sheets so that you have your own budget management tool and bidder. I figured if someone can build a tool to do this stuff and make millions of dollars, there has to be a free way to do it.

I am certain, almost positive there is a better way to write this script and more than certain there is a way to do it at the MCC level to manage multiple accounts. I have not figured that out. It would be great for those that see this that are devs, and or engineers, to make adjustments to this script and share a free version at the MCC level with your own enhancements.

How to set up the script

Before you run the script here are a few things that you need to change.

  1. Make a new Google Sheet. This is where the script will know which campaigns to Pause or UnPause, once you have created a new sheet copy the URL.
  2. Ensure your Tab name is set to “Rules” if not please make sure you update this line where “Rules is changed to whatever your Tab Name is: var spreadsheetAccess = new SpreadsheetAccess(SPREADSHEET_URL, “Rules“)
  3. Still working in Google Sheets, update Row 2 with your account number “000-000-0000” replace with your own.
  4. Row 3 is the time period reference for your script to run, if you want to execute after 7 days, 1 week or a month. Reference the below table for valid inputs for this row as it relates to your goal with controlling your budgets.

Google ads script timeframe options

  • Starting in row 6, column C, you will want to add your budgets for that period
  • Lastly, in row 6, column D, you will want to list your campaigns.

I hope this helps you all in better controlling your budgets. Almost forgot, you can change the campaign.pause in the script to campaign.enable and adjust the simple formula if you want to duplicate the script and create another script to enable campaigns.

Script

var SPREADSHEET_URL = "[https://docs.google.com/spreadsheets/d/1AbldNxsSPHkE0WcOY01AoM7EimF2_7XDrvI5FeLcarY/edit#gid=0]"; var spreadsheetAccess = new SpreadsheetAccess(SPREADSHEET_URL, "Rules"); var totalColumns; function main() { var columns = spreadsheetAccess.sheet.getRange(5, 2, 5, 100).getValues()[0]; for (var i = 0; i < columns.length; i ++) { if (columns[i].length == 0 || columns[i] == 'Results') { totalColumns = i; break; } } if (columns[totalColumns] != 'Results') { spreadsheetAccess.sheet.getRange(5, totalColumns + 2, 1, 1).setValue("Results"); } // clear the results column spreadsheetAccess.sheet.getRange(6, totalColumns + 2, 1000, 1).clear(); var row = spreadsheetAccess.nextRow(); while (row != null) { var budget; try { budget = parseBudget(row); } catch (ex) { logError(ex); row = spreadsheetAccess.nextRow(); continue; } var selector = AdWordsApp.campaigns(); for (var i = 2; i < totalColumns; i ++) { var header = columns[i]; var value = row[i]; if (!isNaN(parseFloat(value)) || value.length > 0) { if (header.indexOf("'") > 0) { value = value.replace(/\'/g,"\\'"); } else if (header.indexOf("\"") > 0) { value = value.replace(/"/g,"\\\""); } var condition = header.replace('?', value); selector.withCondition(condition); } } var campaigns = selector.get(); try { campaigns.hasNext(); } catch (ex) { logError(ex); row = spreadsheetAccess.nextRow(); continue; } var fetched = 0; var changed = 0; while (campaigns.hasNext()) { var campaign = campaigns.next(); var oldCost = campaign.getStatsFor("THIS_MONTH").getCost(); var action = row[0]; var newStatus; fetched ++; if (budget <= oldCost) { campaign.pause(); changed++ } } logResult("Fetched " + fetched + "\nChanged " + changed); row = spreadsheetAccess.nextRow(); } var now = new Date(Utilities.formatDate(new Date(), AdWordsApp.currentAccount().getTimeZone(), "MMM dd,yyyy HH:mm:ss")); } function parseBudget(row) { if (row[1].length == 0) { return null; } var limit = parseFloat(row[1]); if (isNaN(limit)) { throw "Bad Argument: must be a number."; } return limit;
} function logError(error) { spreadsheetAccess.sheet.getRange(spreadsheetAccess.currentRow(), totalColumns + 2, 1, 1) .setValue(error) .setFontColor('#c00') .setFontSize(8) .setFontWeight('bold');
}
function logResult(result) { spreadsheetAccess.sheet.getRange(spreadsheetAccess.currentRow(), totalColumns + 2, 1, 1) .setValue(result) .setFontColor('#444') .setFontSize(8) .setFontWeight('normal');
} function SpreadsheetAccess(spreadsheetUrl, sheetName) { this.spreadsheet = SpreadsheetApp.openByUrl(spreadsheetUrl); this.sheet = this.spreadsheet.getSheetByName(sheetName); this.cells = this.sheet.getRange(6, 2, this.sheet.getMaxRows(), this.sheet.getMaxColumns()).getValues(); this.rowIndex = 0; this.nextRow = function() { for (; this.rowIndex < this.cells.length; this.rowIndex ++) { if (this.cells[this.rowIndex][0]) { return this.cells[this.rowIndex++]; } } return null; } this.currentRow = function() { return this.rowIndex + 5; }
}

PPChero.com

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address

GOOGLE

Google Warns About Misuse of Its Indexing API

Published

on

By

Google Warns About Misuse of Its Indexing API

Google has updated its Indexing API documentation with a clear warning about spam detection and the possible consequences of misuse.

Warning Against API Misuse The new message in the guide says:

“All submissions through the Indexing API are checked for spam. Any misuse, like using multiple accounts or going over the usage limits, could lead to access being taken away.”

This warning is aimed at people trying to abuse the system by exceeding the API’s limits or breaking Google’s rules.

What Is the Indexing API? The Indexing API allows websites to tell Google when job posting or livestream video pages are added or removed. It helps websites with fast-changing content get their pages crawled and indexed quickly.

But it seems some users have been trying to abuse this by using multiple accounts to get more access.

Impact of the Update Google is now closely watching how people use the Indexing API. If someone breaks the rules, they might lose access to the tool, which could make it harder for them to keep their search results updated for time-sensitive content.

How To Stay Compliant To use the Indexing API properly, follow these rules:

  • Don’t go over the usage limits, and if you need more, ask Google instead of using multiple accounts.
  • Use the API only for job postings or livestream videos, and make sure your data is correct.
  • Follow all of Google’s API guidelines and spam policies.
  • Use sitemaps along with the API, not as a replacement.

Remember, the Indexing API isn’t a shortcut to faster indexing. Follow the rules to keep your access.

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

GOOGLE

This Week in Search News: Simple and Easy-to-Read Update

Published

on

This Week in Search News: Simple and Easy-to-Read Update

Here’s what happened in the world of Google and search engines this week:

1. Google’s June 2024 Spam Update

Google finished rolling out its June 2024 spam update over a period of seven days. This update aims to reduce spammy content in search results.

2. Changes to Google Search Interface

Google has removed the continuous scroll feature for search results. Instead, it’s back to the old system of pages.

3. New Features and Tests

  • Link Cards: Google is testing link cards at the top of AI-generated overviews.
  • Health Overviews: There are more AI-generated health overviews showing up in search results.
  • Local Panels: Google is testing AI overviews in local information panels.

4. Search Rankings and Quality

  • Improving Rankings: Google said it can improve its search ranking system but will only do so on a large scale.
  • Measuring Quality: Google’s Elizabeth Tucker shared how they measure search quality.

5. Advice for Content Creators

  • Brand Names in Reviews: Google advises not to avoid mentioning brand names in review content.
  • Fixing 404 Pages: Google explained when it’s important to fix 404 error pages.

6. New Search Features in Google Chrome

Google Chrome for mobile devices has added several new search features to enhance user experience.

7. New Tests and Features in Google Search

  • Credit Card Widget: Google is testing a new widget for credit card information in search results.
  • Sliding Search Results: When making a new search query, the results might slide to the right.

8. Bing’s New Feature

Bing is now using AI to write “People Also Ask” questions in search results.

9. Local Search Ranking Factors

Menu items and popular times might be factors that influence local search rankings on Google.

10. Google Ads Updates

  • Query Matching and Brand Controls: Google Ads updated its query matching and brand controls, and advertisers are happy with these changes.
  • Lead Credits: Google will automate lead credits for Local Service Ads. Google says this is a good change, but some advertisers are worried.
  • tROAS Insights Box: Google Ads is testing a new insights box for tROAS (Target Return on Ad Spend) in Performance Max and Standard Shopping campaigns.
  • WordPress Tag Code: There is a new conversion code for Google Ads on WordPress sites.

These updates highlight how Google and other search engines are continuously evolving to improve user experience and provide better advertising tools.

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

AI

Exploring the Evolution of Language Translation: A Comparative Analysis of AI Chatbots and Google Translate

Published

on

By

A Comparative Analysis of AI Chatbots and Google Translate

According to an article on PCMag, while Google Translate makes translating sentences into over 100 languages easy, regular users acknowledge that there’s still room for improvement.

In theory, large language models (LLMs) such as ChatGPT are expected to bring about a new era in language translation. These models consume vast amounts of text-based training data and real-time feedback from users worldwide, enabling them to quickly learn to generate coherent, human-like sentences in a wide range of languages.

However, despite the anticipation that ChatGPT would revolutionize translation, previous experiences have shown that such expectations are often inaccurate, posing challenges for translation accuracy. To put these claims to the test, PCMag conducted a blind test, asking fluent speakers of eight non-English languages to evaluate the translation results from various AI services.

The test compared ChatGPT (both the free and paid versions) to Google Translate, as well as to other competing chatbots such as Microsoft Copilot and Google Gemini. The evaluation involved comparing the translation quality for two test paragraphs across different languages, including Polish, French, Korean, Spanish, Arabic, Tagalog, and Amharic.

In the first test conducted in June 2023, participants consistently favored AI chatbots over Google Translate. ChatGPT, Google Bard (now Gemini), and Microsoft Bing outperformed Google Translate, with ChatGPT receiving the highest praise. ChatGPT demonstrated superior performance in converting colloquialisms, while Google Translate often provided literal translations that lacked cultural nuance.

For instance, ChatGPT accurately translated colloquial expressions like “blow off steam,” whereas Google Translate produced more literal translations that failed to resonate across cultures. Participants appreciated ChatGPT’s ability to maintain consistent levels of formality and its consideration of gender options in translations.

The success of AI chatbots like ChatGPT can be attributed to reinforcement learning with human feedback (RLHF), which allows these models to learn from human preferences and produce culturally appropriate translations, particularly for non-native speakers. However, it’s essential to note that while AI chatbots outperformed Google Translate, they still had limitations and occasional inaccuracies.

In a subsequent test, PCMag evaluated different versions of ChatGPT, including the free and paid versions, as well as language-specific AI agents from OpenAI’s GPTStore. The paid version of ChatGPT, known as ChatGPT Plus, consistently delivered the best translations across various languages. However, Google Translate also showed improvement, performing surprisingly well compared to previous tests.

Overall, while ChatGPT Plus emerged as the preferred choice for translation, Google Translate demonstrated notable improvement, challenging the notion that AI chatbots are always superior to traditional translation tools.


Source: https://www.pcmag.com/articles/google-translate-vs-chatgpt-which-is-the-best-language-translator

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

Trending