Free through lesson 3

Meta Ads Fundamentals

From the three-level campaign structure and how the auction works to reading CPM, CTR, CPA and ROAS, the Meta Pixel and Conversions API, audiences and creative, budgets and bidding, A/B tests and attribution, and reporting with the Marketing API. Over 20 lessons you get to where you can recompute the numbers in Ads Manager yourself and decide the next move. All ad data is fictional, and every calculation uses only Python's standard library, so it runs right in your browser.

about 3.5 hours in total (estimate)

Curriculum

The 20 lessons are split into 5 chapters. We recommend going in order from Chapter 1, but feel free to dip into whatever interests you. * All ad figures, shops and products are fictional. Names and behavior in Ads Manager change quickly, so check Meta's official help and developer documentation before you set anything up (API examples use Marketing API v27.0, as of November 2026). The code uses only Python's standard library and runs right in your browser.

Chapter 1 — How Meta Ads Work (lessons 1–4)

Find out where ads appear, what you pay for, and how they get chosen, by working through the numbers yourself. You'll finish by running a small model of the auction and seeing why the bid alone doesn't decide the winner.

Chapter 2 — The Measurement Foundation (lessons 5–8)

Compute the metrics from CPM to ROAS yourself, and learn how the Meta Pixel and Conversions API report what happens on your site. You'll finish by deduplicating and tallying events that arrive from both the browser and the server.

Chapter 3 — Audiences and Creative (lessons 9–12)

Organize audiences, placements and creative so you can compare them with numbers. You'll finish with the advertising policies and Japanese law, so you can spot wording that must not run before it runs.

Chapter 4 — Running and Testing (lessons 13–17)

Check budgets and bidding, the learning phase, A/B tests and attribution with calculations and simulations. You'll finish by writing a program that judges an A/B test, so you can tell when it's fair to say there's a difference.

Chapter 5 — Automation and Reporting (lessons 18–20)

Pull reports from the Marketing API and settle on how to read them and what rules to act on. You'll finish by writing a weekly report tool, so you can review every week with the same yardstick.

Once you've finished all 20 lessons, go deeper on working with numbers in Practical Data Analysis, learn the web APIs behind measurement from the building side in API Design for Beginners, or connect payments with Stripe. A membership unlocks every course.