Python has a major focus in SEO but what about PPC? The two disciplines are often treated as polar opposites but they share common goals and adding a bit of Python to a PPC campaign can do wonders for improving conversions, CTR, and time spent.
But before we have a look at how Python can boost your PPC performance, we need to outline what the language is all about.
What is Python?
Python is a programming language created by Guido van Rossum in the 1980s and publicly released in 1991. van Rossum wanted Python to emphasize code readability with five philosophical pillars:
- Beautiful is better than ugly
- Explicit is better than implicit
- Simple is better than complex
- Complex is better than complicated
- Readability counts
Its structure and syntax help users to write logical code regardless of project size.
Companies that use Python include Google (naturally), Netflix, YouTube, NASA, IBM, Mozilla, and Disney.
Is it easy to learn?
How do I install it?
As Jacob Fairclough said, Python can be difficult to install for some users. But that depends on your operating system.
For most Mac users, Python comes built-in so you can use your Terminal to access it. That’s not the case for Windows users. The recommended way is via Anaconda as this also installs a lot of useful libraries to use (which I’ll explain in more detail later).
Google has its own environment as well called Google Colab.
Python techniques to help your PPC campaigns
In the words of Aristotle, “for the things we have to learn before we can do them, we learn by doing them”. And Python is no exception. Practicing Python in SEO is common practice and it’s the same for PPC.
Understanding other languages is important but Python can save professionals a lot of time by automating jobs that would normally take hours.
The amount of data you can obtain from a PPC campaign can grow very quickly so a way to organize and automate it into a logical structure would make everyone’s lives a lot easier in the long run.
Two of the biggest applications of Python are AI and machine learning and they’re also the main bridges between the language and PPC. As Danielle Strouther said in her article AI For PPC Is Only Useful If You Use External Tools, “using AI for PPC is no longer an option. It’s a necessity.” So that’s what we’ll look at – integrating Python with external tools and software.
Other things you can do with Python that can help you with PPC management includes:
- Data scraping
- Data analysis and mining
- Data visualization
- Natural language processing (NLP)
Python + Google Ads
We all know how laborious Google Ads management can be. So Google created an API for its ad platform so users can automate a wide range of PPC-related tasks. You can find a list of them on the Client Library page.
One programmer created a script for KPI reporting which would come in handy for clients, shareholders, and colleagues.
Python + Google Search Console
When you write PPC ads, you want them to convert so your ROI can be as high as possible. Search data from Search Console can help find areas to improve or examples of success to capitalize on.
Passion Digital created a script that analyses search queries from Search Console to gain insights to improve SEO and PPC performance. It does this by finding keywords and phrases with poor conversion rates and CPA using those terms.
Python + Excel/Google Sheets
One of the most common Python workflow combos involves Excel and Google Sheets.
As data can be exported as CSV files and spreadsheets by most external tools, it’s easy to import them into a spreadsheet program. And Python loves data.
The list of ways to use Python and Excel with PPC data is exhaustive. You could use it to project future trends, CTR prediction, campaign creation, keyword generation, bid modifying, account structure analysis, customer match lists, geolocation targeting.
Python + Google Data Studio
Google Data Studio is a powerful tool for data visualization and it’s free to use. So combining it with Python means a streamlined approach to data viz and reporting.
There are also paid tools like Panoply which can integrate Data Studio and Python along with a multitude of services like Salesforce, Zendesk, and Google Analytics. Suddenly you have a large network of data from every department – sales, dev, customer support, project management, design, web analytics. Phew!
You can even spy on your competitors using Python and create PPC reports and graphs with Data Studio to show the results.
Python + Google
The SERPs are more than just a display of results. They can be used as their own data source and give an insight into how well you and your competitors are doing.
With APIs like Serpstack, you can extract data about ads from any SERP and analyze things like position, title and description optimization, sitelinks, and displayed URLs. You can also leverage this with organic results to find new potential keywords you can bid on and improve your campaigns.
Python + Facebook
In 2017, Facebook made its Prophet open source. The forecasting tool is accessible through Python and R (another programming language) and is optimized for businesses to forecast trends, whether they’re hourly, daily, weekly, or seasonal.
It’s highly advanced and mainly for large scale business use but if you have the expertise and the resources, Prophet has the potential to streamline major paid campaigns.
Useful libraries, modules, and APIs
Vanilla Python can do most jobs but its power lies in all the libraries, modules and APIs you can use. Although they all share similarities, they’re all different additions. A module is a Python file containing functions, variables, and methods, a library is a collection of modules and pre-defined functions that let you perform actions without writing the code yourself, while an API is an interface set of standards and instructions.
Here’s a list of some useful ones you can use.
- Pandas (library) – Pandas is an open-source library that makes data structures and data analysis tools. You can make tables, create ordered and unordered data series and “dataframes”, join, merge, and split them. It’s probably the most flexible data analysis tool to have if you’re using Python.
- CSV (module) – This module goes hand-in-hand with pandas as it allows you to export data into a CSV.
- Requests (library) – Requests is a must if you’re scraping web data. It sends requests to HTTP pages, allowing you access to pull anything from a webpage. If you’re planning to scrape SERP data, it’s an essential library to use.
- Beautiful Soup (library) – Beautiful Soup is the companion to requests, letting you take out everything inside an HTTP page.
- Serpstack (API) – The serpstack API allows you to scrape Google SERP data in real-time and at scale and it lets you export the data in JSON and CSV formats (depending on your account level).
- Google APIs (API) – Google being Google, they have a library of APIs you can use for all kinds of things.
- TensorFlow (library) – One of the best libraries for machine learning.
- SciKit Learn (library) – Another machine learning library for predictive data analysis
Learning a programming language can seem daunting but Python is one of the easiest and most accessible languages out there. Its automation and analysis capabilities have a wide range of uses and it can help to simplify complex data and automate time-consuming tasks. Nobody wants to make their jobs harder!
If I had to give some takeaway advice to remember while you learn, I’d say:
Don’t let FOMO get to you
When I started learning Python, I got carried away with jumping into projects without knowing all the techniques. Everyone on Twitter was making amazing scripts and I was still learning about lists and loops. But then I realized I was never going to get to their level by copying and pasting when I didn’t understand. So I went back to my course and focused solely on that.
Fully understanding the basics is the only way you’ll be able to build up to the advanced techniques. And there’s no expiration date on education.
Practice, practice, practice
Most courses come with practice examples. Aside from those, you should always test what you’ve learned. It doesn’t have to be part of a big project, just something small so you can get the hang of the techniques.
Learning something new isn’t always easy. You’ll get frustrated when things don’t work and you may need some time away if it gets too much. But never lose your curiosity. Programming languages have so many applications and some haven’t even been discovered yet. Stay curious and you might find one.
Find others who are learning
Communities are great places to improve your learning. Here are some great places to collaborate and grow with Python:
Sign up to the Python Weekly newsletter
25+ New, Newly Updated, and Timeless Books Content Marketers Love
Content marketers love their books.
That’s apparent year after year when Content Marketing Institute compiles its holiday gifting list.
It was also apparent to anyone who saw the long line of Content Marketing World attendees waiting to get an autographed copy of Ann Handley’s new release. No surprise, the second edition of Everybody Writes was the most nominated tome on the list.
Whether you’re giving a gift or needing some titles to add to your wish list, consider these 25 options – seven published in 2022 – recommended by your peers in the #CMWorld Slack channel and on LinkedIn.
The books on the list aren’t about content marketing only. They also cover creativity, writing, personal branding, and other topics sure to inspire, motivate, and teach marketers who are all about content.
Each entry includes an excerpt from the Amazon description and a comment (if provided) by the recommender.
Recommendations for new and newly updated books
Content Chemistry: The Illustrated Guide to Content Marketing (2022), by Andy Crestodina
From the Amazon description: The result of thousands of conversations about web marketing with hundreds of companies, this handbook is a compilation of the most important and effective lessons and advice about the power of search engine optimization, social media, and email marketing.
Recommended by Heidi Cohen, chief marketing officer, Actionable Marketing Guide: “This book is a textbook for several graduate programs. Andy quietly updates it so that it’s up to its sixth edition.”
The Content Puzzle and the Missing Piece (2022), by Andi Robinson
From the Amazon description: “The content itself is one part of content marketing, but in many respects, it is not the most important. Before you start thinking about what types of content you need to create, you need to lay the groundwork. Think of this as the edge of the puzzle that holds the whole picture together. As you will learn, there are a lot of steps that you need to take into consideration before you get to the actual creation of content.”
Recommended by Jeremy Bednarski, content strategist, Salesforce: “Not only does Andi provide you with the basics to understand the pieces of the content puzzle, but she brings the psychological aspect to help you take your content strategy to the next level.”
Everybody Writes: Your New and Improved Go-To Guide to Creating Ridiculously Good Content (2022), by Ann Handley
From the Amazon description: In this brand-new edition, Ann delivers all the practical, how-to advice and insight you need for the process and strategy of content creation, production, and publishing.
Recommended by Rachel Duthie, communications specialist, Shearer’s Foods: “The content marketing bible.”
Also recommended by Michelle Garrett, founder, Garrett Public Relations; Jeremy Bednarski, content strategist, Salesforce; Danielle Love, content marketing strategist, AmerisourceBergen; Heidi Cohen, chief marketing officer, Actionable Marketing Guide; Gina Balarin, founder, Verballistics; and Michelle Araiza, senior global marketing manager, demand generation, IQVIA.
I’m Not a Copywriter, But …: Lessons Learned from a Late Bloomer (2022), by Joshua Womack
From the Amazon description: Stand-up comedy. Speechwriting. Pro wrestling? Somehow, these oddball life choices led Josh Womack to copywriting. In his debut book, he talks about these experiences and more.
Recommended by Jeremy Bednarski, content strategist, Salesforce: “If you’re a writer who needs some tips or inspiration, this book is full of them. Josh made his way to copywriting by way of stand-up comedy and shares stories about how he found his way.”
Lights, Camera, Impact: Storytelling, Branding, and Production Tips for Engaging Corporate Videos (2022), by Tony Gnau
From the Amazon description: Make every video-production dollar count with Tony’s short storytelling tips for digital marketing and internal communication professionals. You’ll learn DIY shooting suggestions for work you do without the video pros. This guide gives you the insights from top thought leaders in corporate communication in order to create a solid video-marketing plan.
Recommended by Lisa Dougherty, director, blog operations and community, Content Marketing Institute: “Tony’s book is for anyone wanting to create exceptional video content. His guide is filled with helpful information so you can finally create your video marketing strategy.”
Making Numbers Count: The Art and Science of Communicating Numbers (2022), by Chip Heath and Karla Starr
From the Amazon description: Making Numbers Count outlines specific principles that reveal how to translate a number into our brain’s language. This book is filled with examples of extreme number makeovers, vivid before-and-after examples that take a dry number and present it in a way that people click in and say, ‘Wow, now I get it!’
Recommended by George Stenitzer, founder and chief content officer, Crystal Clear Communications: “It will enable you to communicate numbers without confusing your audience, who may or may not understand fractions and percentages. This improves your content and your results reporting. You can read my in-depth review of the book on my blog.”
Prove It: Exactly How Modern Marketers Earn Trust (2022), by Melanie Diezel
From the Amazon description: Using real-world examples from trusted brands across dozens of industries, they’ll walk you step-by-step through the process of identifying and categorizing your business promises – even the ones you don’t realize you’re making – gathering the right evidence and backing up each style of claim.
Recommended by Andi Robinson, consultant, Hijinx Marketing: “Consumers are savvy about marketing. We can no longer make claims that we can’t back up with proof. Melanie lays out a roadmap for how companies can show their audience why they should buy their products or services. The easy-to-read format, with commentary from Phil Jones, should be on every marketer’s bookshelf.”
Using Behavioral Science in Marketing: Drive Customer Action and Loyalty Prompting Instinctive Responses (2022), by Nancy Harhut
From the Amazon description: The book shows how to apply behavioral science principles in key areas of marketing, including marketing communications, email, direct mail and ad campaigns, social media marketing and sales funnel conversion strategies. Highly practical and accessible, it includes case studies and examples from AT&T, Apple, Spotify, and The Wall Street Journal.
Recommendations for timeless books
Bird by Bird: Some Instructions on Writing and Life (1994), by Anne Lamott
From the Amazon description: With this basic instruction always in mind, Anne Lamott returns to offer … a step-by-step guide on how to write and on how to manage the writer’s life. Bracingly honest, she is also one of the funniest people alive.
Recommended by Danielle Love, content marketing strategist, AmerisourceBergen: “This book reminds us that writing is a journey. If we truly savor all the steps along the way, we will create a richer experience for ourselves and our readers.”
Building a Story Brand (2017), by Donald Miller
From the Amazon description: Donald Miller teaches marketers and business owners to use the seven universal elements of powerful stories to dramatically improve how they connect with customers and grow their businesses.
Recommended by Hanush Kumar, content and brand marketer, Kissflow: “He gives a seven-step framework to write compelling stories and offers adequate examples. Once you know the framework, it is likely that every movie becomes pretty much predictable.”
Buyer Personas: How To Gain Insight Into Your Customer’s Expectations, Align Your Marketing Strategies, and Win More Business (2015), by Adele Revella
From the Amazon description: This book provides comprehensive coverage of a compelling new way to conduct buyer studies, plus practical advice on adopting the buyer persona approach to measurably improve marketing outcomes. Readers will learn how to segment their customer base, investigate each customer type, and apply a radically more relevant process of message selection, content creation, and distribution through the channels that earn the buyers’ trust.
A new edition with co-author Jim Kraus debuts in late 2023.
Recommended by Sarah Mitchell, founder, Typeset: “The whole book is good, but she has a fantastic section on interviewing and extracting information from buyers.”
The Content Fuel Framework: How To Generate Unlimited Story Ideas (2020), by Melanie Diezel
From the Amazon description: This simple framework catalyzes the brainstorming process, making idea generation effortless and nearly automatic. No more writer’s block. No more asking, “what should I post?” No more waiting for that “big idea” to show up in its own time. This system allows storytellers from any industry to produce fresh story ideas on demand, at any time.
Recommended by Daniel Foley, founder, Daniel Foley SEO: “Her book provides a straightforward structure for idea-generating and brainstorming that can help you develop a marketing strategy. The book is organized around a matrix with 10 distinct ‘focuses’ and 10 distinct ‘formats’ at its core. The approach in this book enables digital marketers, content producers, and anybody else who interacts with an audience to regularly deliver original new content.”
Also recommended by Danielle Love, content marketing strategist, AmerisourceBergen.
Content, Inc.: Start a Content-First Audience, Build a Massive Audience, and Become Radically Successful (With Little or No Money) (2021), by Joe Pulizzi
From the Amazon description: Content Inc. provides an ingenious approach to business based on a profoundly simple concept: Having a singular focus on the audience, and building a loyal audience directly, provide the best, most nuanced understanding of what products ultimately make the most sense to sell.
Don’t Make Me Think, Revisited: A Common Sense Approach to Web Usability (2013), by Steve Krug
From the Amazon description: It’s the guide to help … understand the principles of intuitive navigation and information design. Witty, commonsensical, and eminently practical, it’s one of the best-loved and most recommended books on the subject … And it’s still short, profusely illustrated … and best of all – fun to read.
Recommended by Jennifer Best, vice president, marketing, All American Entertainment Speakers Bureau: “We should always use language that’s compatible with the reader’s level of understanding while staying as simple as possible to get our point across.”
Epic Content Marketing: How To Tell a Different Story, Break Through the Clutter, and Win More Customers by Marketing Less (2013), by Joe Pulizzi
From the Amazon description: This book takes you step by step through the process of developing stories that inform and entertain and compel customers to act – without actually telling them to. Epic content, distributed to the right person at the right time, is how to truly capture the hearts and minds of customers. It’s how to position your business as a trusted expert in its industry. It’s what customers share and talk about.
A new edition with co-author Brian Piper debuts March 7, 2023.
Recommended by Paul Somerville, editor-in-chief, Electric Scooter Guide: “Joe Pulizzi, a content marketing expert, demonstrates how to captivate potential clients by producing content that they actually want to engage in. Fortune Magazine listed Epic Content Marketing as one of the five must-read books.”
Also recommended by Rachel Duthie, communications specialist, Shearer’s Foods.
How to be Great at Your Job: Get Things Done. Get the Credit. Get Ahead., (2018) by Justin Kerr
From the Amazon description: From an author who climbed to the top of the corporate ladder before reaching age 40, this book takes the guesswork out of career success and breaks down what it takes to excel at your job.
Recommended by Rachel Duthie, communications specialist, Shearer’s Foods: “Not a content marketing book. However, Justin has some great tips everyone could learn.”
Known: The Handbook for Building and Unleashing Your Personal Brand in a Digital Age, (2017) by Mark Schaefer
From the Amazon description: In today’s world, there is a permanent advantage to becoming known in your field. Those who are known get the customers, the better jobs, and invitations to exclusive opportunities. But can anybody become known? This path-finding book provides a step-by-step plan followed by the most successful people in diverse careers like banking, education, real estate, construction, fashion, and more.
Recommended by Karine Abbou, founder, Marketing Leaders: “I do think personal branding will soon be the only marketing that is left – and to build a strong personal brand without a massive content strategy is nearly impossible.”
Made to Stick: Why Some Ideas Die and Others Thrive (2007), by Chip & Dan Heath
From the Amazon description: The authors reveal the anatomy of ideas that stick and explain ways to make ideas stickier, such as applying the human scale principle, using the Velcro Theory of Memory, and creating curiosity gaps. Along the way, we discover that sticky messages of all kinds – from the infamous ‘kidney theft ring’ hoax to a coach’s lessons on sportsmanship to a vision for a new product at Sony – draw their power from the same six traits.
Recommended by Laura Bakopolus Goldstone, senior director of communications and branding strategy, AdDaptive Intelligence: “It’s not brand new but has provided a fantastic framework for making content marketing simple, clear, relevant, concrete, and sticky.”
Obviously Awesome: How to Nail Product Positioning so Customers Get It, Buy It, Love It (2019), by April Dunford
From the Amazon description: This book shows you how to find your product’s ‘secret sauce’ – and then sell that sauce to those who crave it. Having spent years as a startup executive (with 16 product launches under her belt) and a consultant (who’s worked on dozens more), the author speaks with authority about breaking through the noise of a crowded market.
Recommended by Heidi Cohen, chief marketing officer, Actionable Marketing Guide: “This book shows people how to implement positioning. It’s a new classic. Without understanding this, the rest of your marketing strategy and content aren’t aligned.”
On Writing: A Memoir of the Craft (2000), by Stephen King
From the Amazon description: Part memoir, part master class by one of the bestselling authors of all time, this superb volume is a revealing and practical view of the writer’s craft, comprising the basic tools of the trade every writer must have.
Recommended by Michelle Garrett, founder, Garrett Public Relations: “His personal stories and practical advice make the one a must-read for any writer.”
Practical Content Strategy & Marketing: The Content Strategy & Marketing Course Guidebook (2017), by Julia McCoy
From the Amazon description: This book lays the ‘hows’ of content marketing and strategy out, in a step-by-step approach, book form. Each section has written exercises built to solidify what you’re reading and learning – you’ll be able to fill these out with a pen.
Recommended by Alex Armstrong-Paling, managing director, ToolFit: “Finally, a practical, real-world guide to content marketing is available with built-in exercises to strengthen and expand understanding and learning. The author exhorts you to understand the operational idea that forms the cornerstone of marketing and strategy.”
Also recommended by Rachel Duthie, communications specialist, Shearer’s Foods.
RE:Think Innovation: How the World’s Most Prolific Innovators Come Up With the Great Ideas That Deliver Extraordinary Outcomes (2021), by Carla Johnson
From the Amazon description: This book answers the question of how to tie individual competence with innovation techniques to direct corporate outcomes. It shows how to create a unified, idea-driven employee base that delivers more ideas in a shorter amount of time.
Recommended by Jeremy Bednarski, content strategist, Salesforce: “For marketers looking to get out of a creativity rut or getting past ‘this is how we always do things,’ Carla outlines a process to apply new ideas. By better capturing everything we observe, you’ll learn how to apply it to get to new ideas that help you reach your marketing goals.”
Also recommended by Danielle Love, content marketing strategist, AmerisourceBergen.
The Secret Army: Leadership, Marketing and the Power of People (2017), by Gina Balarin
From the Amazon description: Bringing together beautifully told stories, real-life examples, thorough research and the wisdom of credible business leaders, authors and thinkers, this book dives beneath the surface of modern corporate life to expose the hidden humanness that drives us.
Self-nomination by Gina Balarin: “It contextualizes the power of communication in our workplaces, with an emphasis on how our ‘secret army’ (spoiler alert: customers, leaders, and employees) can make work meaningful and, quite frankly, better.”
What Great Brands Do: The Seven Brand-Building Principles That Separate the Best From the Rest, (2014) by Denise Lee Yohn
From the Amazon description: Delivering a fresh perspective, this book teaches an innovative brand-as-business strategy that enhances brand identity while boosting profit margins, improving company culture, and creating stronger stakeholder relationships. Drawing from 25 years of consulting work with such top brands as Frito-Lay, Sony, Nautica, and Burger King, the author explains key principles of her brand-as-business strategy.
Recommended by Rachel Duthie, communications specialist, Shearer’s Foods
Writing Without Bullshit: Boost Your Career by Saying What You Mean (2013), by Josh Bernoff
From the Amazon description: In this practical and witty book, you’ll learn to front-load your writing with pithy titles, subject lines, and opening sentences. You’ll acquire the courage and skill to purge weak and meaningless jargon, wimpy passive voice, and cowardly weasel words. And you’ll get used to writing directly to the reader to make every word count. At the center of it all is the iron imperative: treat the reader’s time as more valuable than your own.
Recommended by Danielle Love, content marketing strategist, AmerisourceBergen: “This author urges you to think critically about clarity in your writing. What is the true message hidden behind the corporate-speak and how can you make it more evident for your readers?”
Youtility: Why Smart Marketing Is About Help, Not Hype, (2013), by Jay Baer
From the Amazon description: Drawing from real examples of companies who are practicing Youtility as well as his experience helping more than seven hundred brands improve their marketing strategy, the author provides a groundbreaking plan for using information and helpfulness to transform the relationship between companies and customers.
Recommended by Mike Myers, senior consultant, CEO stakeholder and integrated executive communications, Nationwide: “I got my start in content marketing because of this book. The mix of sound advice and practical, real-world examples helped me understand this ‘new’ thing (which, of course, wasn’t new at all) so clearly and inspired me to get involved!”
Even more book ideas
If you’re still shopping for just the right book, consider these additional recommendations mentioned by readers last year:
- AI for Marketers: An Introduction and Primer, third edition (2021), by Christopher Penn
- Brand Bewitchery: How to Wield the Story Cycle System to Craft Spellbinding Stories for Your Brand (2020), by Park Howell
- Break The Wheel: Question Best Practices, Hone Your Intuition, and Do Your Best Work (2018), by Jay Acunzo
- Company of One: Why Staying Small is the Next Big Thing for Business (2019), by Paul Jarvis
- Everyone Is an “Influencer”: Building a Brand by Engaging The People Who Matter Most (2021), by Kelly Keenan
- Find Your Red Thread: Make Your Big Ideas Irresistible (2021), by Tamsen Webster
- Lost and Founder: A Painfully Honest Guide to the Startup World (2018), by Rand Fishkin
- Meander, Spiral, Explode: Design and Pattern in Narrative (2019), by Jane Alison
- The Power of Moments: Why Certain Experiences Have Extraordinary Impact (2017), by Chip and Dan Heath
- You’re Not Listening: What You’re Missing and Why It Matters (2020), by Kate Murphy
What book would you add to this list? Tell us in the comments below.
HANDPICKED RELATED CONTENT:
Cover image by Joseph Kalinowski/Content Marketing Institute