Code Monkey home page Code Monkey logo

conductor's Introduction

Conductor

Conductor is a set of scripts that use data from your internal database in order to build out hourly bid modifiers for your Adwords campaigns.

What does conductor need?

  • Access to python (we use 2.7) and pip (to install requirements)
  • Access to a postgres database (we use redshift)

What can Conductor do?

  • Modify bids at the keyword level for all tagged campaigns based on time of day performance
  • Pull information from your database in order to calculate bid modifiers
  • Work off a CPA or ROI target

What can't Conductor do?

  • Modifiy bids based on individual adgroup or keyword level performance
  • Modify bids based on time of day and day of week

How do I set Conductor up?

  1. Get adwords API access here
  2. Set up labels for campaigns you'd like this script to operate on.
  3. Clone this repo down to your computer. If you've never done that before, follow the instructions here
  4. Follow the instructions here for finding all necessary credentials.
  5. Set up database credentials here and the query that either gets you revenue for an ROI calculation, or a count of KPIs for a CPA calculation.
  • This file is set up for a Postgres based DB. If you work off of a MySQL DB then you'll need to follow the instructions found here for accessing your DB.
  1. Add your CLIENT_ID and CLIENT_SECRET to generate_refresh_token.py then run the command python generate_refresh_token.py in the command line. Follow the instructions in order to get your refresh token.
  2. Add your developer_token, client_id, client_secret, client_customer_id, and refresh_token to the file googleads.yaml. Copy that file to your home directory.
  3. If you are going to use a label to decide which campaigns to run this on, then you must run the following command python get_account_labels.py. You will see an output of all campaigns with their attached labels. Copy the LabelId for your desired label.
  • If you would instead prefer to run this script on every campaign in your account. You must remove lines 29 - 33 in the adwords_api.py file found here
  1. Paste the LabelId into this line in the file adwords_api.py
  2. Set up your ROI or CPA goal in create_bids.py found here
  3. Install the python requirements using pip install -r requirements.txt from the base of this repository.
  4. Run this command: python run.py. You should see the script operating on all desired campaigns!

How do I automate this script to run every hour?

You can always ask super nicely to get some help deploying the app to the cloud from your trusty development team...or figure it out yourself!

I haven't taken the time to do this yet, and plan to do more work on this in the future anyway. In the meantime I have it set up to run automatically every hour on my work comp. If your work comp doesn't live at work...this solution may be a problem.

If you've never played around with Applescripts, they are a great way to automate running files on your OSX machine. This is a pretty good tutorial on Applescripts.

Anyway, just open up Applescripts and paste the content of automater.apple_script found here into the editor. Make sure you edit line 3 to include the path to the repo.

Save the script as an application.

You can use Apple Calendar's "Alert" feature in order to open a file...which in this case will be the application you just created. Set the file to run every hour on the hour and you're good to go.

Work at SeatGeek

If this is how you like to solve problems you run into every day at work, then I think you'd get along great with our team. We're hiring for almost everything! Check out our Jobs Page

conductor's People

Contributors

josegonzalez avatar

Watchers

 avatar

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.