/Freedan

A convenient and fast pythonic wrapper for the Google AdWords API. Automate your accounts, improve efficiency, test new ideas.. and when your job executed by the machine you'll sip margaritas at the beach.

Primary LanguagePythonApache License 2.0Apache-2.0

Freedan - The AdWords Automation Framework

Freedan is a framework to quickly create cross-account automation with Google AdWords. Using it, one can easily automate big parts of manual day-to-day work, quickly test new ideas to improve performance or even build sophisticated software solutions such as a custom bidding algorithm.

How does it compare to other AdWords automation solutions from Google?

Freedan provides an alternative to UI Scripts, Power Editor by building on top of the native Python client library for Google AdWords.

Especially when accounts become large, the former solutions tend to get slow and painful to use. Compared to UI Scripts, you have the freedom to test and integrate the code to your existing code base. Also, you won't encounter any of the limitations such as limited runtime, limited scheduling options, operation limits etc. since you can host it on your own.

Freedan provides a simpler user interface for the most frequently used parts of the AdWords API, while incorporating all best practises suggested by Google.

Use cases

Common goals for Freedan scripts:

  • Validate/adapt namings of accounts, campaigns, adgroups, ... > improve data quality
  • Delete old/empty campaigns, adgroups, ... > improve speed when working with Power Editor
  • Adjust bids > improve cost efficiency of accounts
  • Update ads > improve customer experience + raise CTR
  • Create negative keywords > reallocate search queries to more suitable keywords and/or block bad traffic
  • Create new accounts / add more keywords > increase reach to target more customers

Expected workflow of those scripts:

  1. Gather custom input (CLI, data warehouses, Google Drive, ...)
  2. Gather account information from AdWords
  3. Compute changes
  4. Upload updated parameters back to AdWords

Getting started

  1. For an introduction to AdWords refer to AdWords_Introduction.md.

  2. Install python 3.6.

  3. You can install Freedan using pip.

    $ pip install freedan

  4. Get access to AdWords API and cache all credential information in a .yaml file.

    from freedan import AdWordsService
    
    credentials_path = "adwords_credentials.yaml"
    adwords_service = AdWordsService(credentials_path)
    
  5. Try to run the code in examples/basic/account_hierarchy.py to see if everything is working.

Technology

  • Everything is built with Python. I'm using python 3.6. and didn't check for compatibility with other Python versions
  • All scripts heavily rely on pandas: The flexible, easy and powerful data analysis library for python
  • Tests are intended to work with pytest: A very easy, yet powerful framework for testing

Examples

Please have a look at the example folder. Those scripts demonstrate the power and beauty of the framework. Some of the advanced scripts might be ready for production as they are - so they might safe you a lot of time. Let me know if you find them useful!

Who do I talk to?

The project was launched and is currently maintained by me, Martin Winkel: martin.winkel.pps@gmail.com.

I recently relocated to Vancouver, BC, Canada.

Bugs

If you've found a bug, please let me know. File an issue or send me an email.

Contribute

Contributors are very welcome! There's still a lot of good stuff to build :)

If you find any important functionality missing, please let me know or create a pull request.

Future

The next big step will be the addition of placeholder methods to Account, Campaign, AdGroup and ETA. You'll then be able to plug and play your unique business logic encoded in the names of those objects.