https://github.com/desk888/googleads-campaigns-visibility-checker
Google Ads Integrated Script to perform daily checks on campaigns to ensure visibility and send out emails alerts if campaign/s falls below a set threshold of visibility.
https://github.com/desk888/googleads-campaigns-visibility-checker
digital googleads marketing ppc
Last synced: 4 months ago
JSON representation
Google Ads Integrated Script to perform daily checks on campaigns to ensure visibility and send out emails alerts if campaign/s falls below a set threshold of visibility.
- Host: GitHub
- URL: https://github.com/desk888/googleads-campaigns-visibility-checker
- Owner: Desk888
- License: apache-2.0
- Created: 2024-06-14T15:41:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-12T14:17:41.000Z (6 months ago)
- Last Synced: 2025-01-13T22:39:14.689Z (5 months ago)
- Topics: digital, googleads, marketing, ppc
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Daily Campaign Visibility Checks
This script performs daily visibility checks on Google Ads campaigns and sends an email alert if any campaigns have received low impressions below a specified threshold.
## Getting Started
These instructions will help you set up and run the script to perform daily campaign visibility checks.
### Prerequisites
- Google Ads account
- Google Apps Script project
- Access to the MailApp service for sending email alerts### Configuration
1. Open the script in your Google Apps Script project.
2. In the `config` object, set the following variables:
- `impressionThreshold`: The minimum number of impressions a campaign should have. If a campaign's impressions fall below this threshold, it will be included in the email alert. Default value is '5'.
- `emailAddresses`: The email addresses to which the alert should be sent. Multiple email addresses can be specified by separating them with commas.### Usage
1. Run the `main` function to start the script.
2. The script will retrieve the campaigns from the connected Google Ads account and check their visibility.
3. If any campaigns have received impressions below the specified threshold, an email alert will be sent to the configured email addresses.
4. The script will log the progress and completion status in the Google Apps Script logger.## Functionality
The script performs the following steps:
1. Selects the current Google Ads account and retrieves the account name.
2. Sets the email subject dynamically based on the account name.
3. Initializes the email message with an HTML table structure.
4. Iterates over all the campaigns in the account.
5. For each enabled campaign, retrieves the impression statistics for the current day.
6. If the number of impressions is less than or equal to the specified `impressionThreshold`, the campaign is considered to have low visibility and is added to the email message.
7. After iterating through all campaigns, the script closes the HTML table and body tags.
8. If any campaigns with low visibility are found, the script sends an email alert to the specified email addresses.
9. If no campaigns with low visibility are found, the script logs a message indicating that no low impression campaigns were found.## Email Alert Format
The email alert includes the following information:
- Subject: "Daily Campaign Visibility Checks for: [Account Name]"
- Body:
- Heading: "Daily Campaign Visibility Checks"
- Paragraph: "The following campaigns have received low impressions below the Impression Threshold of [Impression Threshold] impressions:"
- Table:
- Header:
- Engine
- Account Name
- Campaign Name
- Impressions
- Rows (for each low visibility campaign):
- Engine: "Google Ads"
- Account Name: The name of the Google Ads account
- Campaign Name: The name of the campaign
- Impressions: The number of impressions received by the campaign## Built With
- Google Apps Script
- Google Ads API
- MailApp service## Acknowledgments
- Hat tip to anyone whose code was used
- Inspiration
- etc.Feel free to customize the README file further based on your specific project requirements and add any additional sections or information as needed.