OpenAnalytica — Free and Open Source Ad Targeting for Campaigns

Digital Director
3 min readOct 8, 2018

--

Slice the voter file into important demographic groups for easy upload and accurate targeting on social media platforms like Facebook, YouTube, and Twitter.

Example of how to target important voter segments with Facebook’s Ad Manager.

Why We Built It

Digital Directors and the political campaigns they run face a unique marketing challenge unlike most businesses — they must reach a wide range of voter demographics across a wide range of issues in a short amount of time. Advertising methods used in industry are increasingly being used in political campaigns with significant impact. Yet, most campaigns from local school board elections to U.S. Senate races are not using best practices in digital advertising.

That’s why we built a tool for highly motivated campaign digital directors who understand the importance of data driven campaign messaging but may lack the experience or funds to implement best practices.

How It Works

Before you get started, the tool will require you or a friend to be able to a) run a Python script and b) work with advanced social media targeting settings like the Facebook Ad Manager.

OpenAnalytica is a Jupyter notebook with associated Python (& Pandas) scripts for taking a free NationBuilder voter file and generating voter demographic segments as CSV files for use in ad targeting on various social media platforms such as Facebook, YouTube, and Twitter.

The tool provides:

  • Data quality analysis and data cleaning of the voter file
  • Data visualizations across various voter demographics and elections
  • Segmented CSV files grouped by voter age, gender, and party affiliation
  • Tutorial for using the newly generated CSV files for Facebook ad targeting
View the distribution of voter ages for each election and gain important ad budgeting insights.
View and save CSV files for each voter demographic segment (incl. age, gender, and party).
Upload voter demographic segments to Facebook Ad Manager.
Target specific voter demographic segments with a Facebook ad.

In summary, this tool should automate a large chunk of the workflow for those looking to run targeted political ads. Digital Directors, Campaign Managers, Social Media Consultants, and even Volunteers can use this tool to reach real people who vote.

Stay In Touch

We hope others find this work useful and encourage those looking to collaborate to email us at hello@digitaldirectorlabs.com or fork the repo. You can also follow the project on Twitter @dd_labs where we’ll share additional tools, tips, and tricks in the final weeks before the U.S. midterm elections and long term plans for the project.

-DD

--

--

Digital Director

Automata for the Digital Economy - Building process automation and machine learning based applications for digital businesses.