Quickly stop all Google Ads advertising
Project description
sem-emergency-stop
Stop all Google Ads marketing. This utility will pause all marketing campaigns on Google Ads (presumably across many accounts) as fast as possible. The main use case is emergency response during incidents where all landing pages are temporarily unavailable, thereby incurring cost without revenue. Unpausing the paused campaigns (and only those) is also supported.
Usage
In case of emergency, do this:
sem-emergency-stop pause --no-dry-run
A hash will be printed at the end of the process. Use this hash to unpause when the incident is over (the exact instructions are displayed when you run.)
One-time setup (for end users)
Install the tool (requires Python 3.7 or higher; on Ubuntu 18.04 install python3.7-minimal
):
pip3 install --user sem-emergency-stop
You can then run sem-emergency-stop setup
to authenticate the tool against the API using your Google account. This will request two pieces of information from you:
- An organization token. How you get this token depends on your organization's process. See the next section if you are the person to set this up for your organization.
- A token specific to your Google account. Follow instructions on screen. Note that you need to have access to your Ads accounts with your Google account.
Deployment at organizations
Authentication uses Google's OAuth2 flow. This app does not come with client secrets, so you will have to generate these and distribute them in your organization through a suitable channel (e.g. using password manager). The client id/secret together with your login customer id and your developer token are packaged in a compact organization token for distribution purposes.
After installing the app, you can generate a token by running ses-create-org-token
. It will ask the following information:
- Login customer id - this is the customer id (without dashes) of your root Google Ads account.
- Developer token - find it in your root account under "API Center".
- Client id/secret - follow this guide how to obtain a pair.
Development and contributing
For development pipenv is required on your system. Set up the development environment with make develop
, run with pipenv run sem-emergency-stop ...
as needed.
We welcome pull requests; if you are planning to perform bigger changes then it makes sense to file an issue first. Make sure make lint
comes back clean.
Security
For sensitive security matters please contact security@getyourguide.com.
Legal
Copyright 2021 GetYourGuide GmbH.
sem-emergency-stop is licensed under the Apache License, Version 2.0. See LICENSE for the full text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sem-emergency-stop-1.3.11.tar.gz
.
File metadata
- Download URL: sem-emergency-stop-1.3.11.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04b2e4932cf475aaa25d9f72605fa8844a3d14d388faf0458a8c6e5e1ac53889 |
|
MD5 | 7a71b1f1c885f8b37dbbf3f47ea337c8 |
|
BLAKE2b-256 | dfdacc414fed46abbe5ab7752dee50b85d23fb4f99a948d2054ef0c2ac0ad95b |
File details
Details for the file sem_emergency_stop-1.3.11-py3-none-any.whl
.
File metadata
- Download URL: sem_emergency_stop-1.3.11-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b9ee2fe8676e804c125535015884e00231b846ca5dcbc39aeba0b0d520fb214 |
|
MD5 | b3a45058808f6cd6b7347bd4ab894abf |
|
BLAKE2b-256 | 8efe5f994ba95f31b5c1b1c84d97ac7d08f892bb8d6f2d94506a6a01fc483f5e |