Giter Site home page Giter Site logo

getyourguide / sem-emergency-stop Goto Github PK

View Code? Open in Web Editor NEW
2.0 57.0 0.0 278 KB

Quickly stop all Google Ads advertising

Home Page: https://pypi.org/project/sem-emergency-stop/

License: Apache License 2.0

Makefile 0.63% Python 96.62% Nix 2.75%
google-ads google-ads-api sem search-engine-marketing incident-response incident-management uses-google-ads-library team-ps

sem-emergency-stop's Introduction

sem-emergency-stop

Logo

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:

  1. 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.
  2. 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 [email protected].

Legal

Copyright 2021 GetYourGuide GmbH.

sem-emergency-stop is licensed under the Apache License, Version 2.0. See LICENSE for the full text.

sem-emergency-stop's People

Contributors

alexef avatar baecher avatar dependabot[bot] avatar mariamsoady avatar smeb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sem-emergency-stop's Issues

Remember campaign set of last pausing operation

As an incident responder I would like to be able to resume marketing without having to note down the hash from the pausing operation because I may forget this and accidentally close my terminal.

The most straight forward implementation would be to store the campaign-sets hash of the most recent pausing operation on disk. Running unpause without arguments would take this hash as input.

More sophisticated implementations could later store a structured append-only log similar to git reflog.

Show progress and rate of progress

As an incident responder I am nervous about the progress of the app so I would like to see some compact progress indicator less technical and less spammy than --verbose.

A straight-forward implementation would display a single line with \r that updates once a second with total # of campaigns and campaigns/s, similar to wget.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.