Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Data Analytics for Marketing
Data Analytics for Marketing

Data Analytics for Marketing : A practical guide to analyzing marketing data using Python

eBook
€17.99 €26.99
Paperback
€33.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Data Analytics for Marketing

What is Marketing Analytics?

Half the money I spend on advertising is wasted; the trouble is I don’t know which half.

– John Wanamaker, the forefather of marketing

In this chapter, we will attempt to cover the fundamentals of marketing analytics as a role and discipline. As a marketing analyst, you are faced with common questions during your day-to-day activities. For example, “How did this campaign perform?” or “How can you optimize your budget to achieve a result?”.

In this chapter, we will break down the types of analytics (from descriptive to prescriptive), the value they add to a business, and the questions each of them answers.

You will learn about the following topics:

  • What is analytics?
  • An overview of marketing analytics
  • Exploring different types of analytics
  • Beyond simple pivot tables
  • Why Python?
  • Modern challenges in the world of privacy-centric marketing
  • The importance of data engineering...

What is analytics?

Like any buzzword, analytics can often be overused and hard to define from an exact source. According to the Oxford Dictionary, the textbook definition of analytics is “the systematic computational analysis of data or statistics, in order to describe, predict, and improve business performance”. Gartner defines it more broadly as “statistical and mathematical data analysis that clusters, segments, scores, and predicts what scenarios are most likely to happen.”

Analytics is commonly known to branch out into four pillars or areas: descriptive analytics, diagnostic analytics, predictive analytics, and prescriptive analytics.

In essence, analytics is the act of extracting meaningful and actionable insights from data by using a set of techniques and tools paired with domain knowledge. Raw data, however large it may be, will not be a silver bullet in your quest for insights in marketing. Neither will advanced techniques and a lack of domain...

An overview of marketing analytics

The quote at the beginning of this chapter illustrates one of the fundamental questions of the marketing manager in their day-to-day activities. The best way to evaluate where to spend and target their efforts to achieve their ultimate target is to obtain new customers or retain current ones.

Marketing analytics is nothing more than the application of analytical methods to said goal, bringing a quantifiable way of guiding investment or consumer targeting decisions. As with any new and growing domain, it is hard to pin an exact definition of it, but we can define it as a “technology-enabled and model-supported approach to harness customer and market data to enhance marketing decision making”. Being a domain in the larger field of data analytics, it looks to use mathematics and statistics together with computational tools and techniques to find meaningful patterns and knowledge in data. In this book, we will strive to focus on only...

Exploring different types of analytics

As we have seen earlier, analytics is a broad term covering four different pillars in the modern analytics ladder. Each plays a role in how your business can better understand what your data reveals and how you can use those insights to drive business objectives.

The following diagram will help you visualize how the pillars relate to one another:

Figure 1.2 – The analytics maturity model

Figure 1.2 – The analytics maturity model

The first step in the process is to always understand the fundamental questions you are trying to answer. All analytical questions can be boiled down into the following categories:

  • What happened and when did it happen?
  • Why and how did it happen?
  • What will happen in the future?
  • How can I make something happen?

These categories will define the different areas of analytics involved, which will inform our decision about what tooling and techniques to apply.

Analytics can be split into four areas...

Beyond simple pivot tables

You might wonder why we need a book on Marketing Analytics Using Python. Surely you can do the same thing using the trustworthy combination of Excel, some VLOOKUPs, and some PivotTables. This is a widespread misunderstanding, and the problem stems from not realizing what the entire analytical process should look like and why. The following diagram shows the process in a simplified way:

Figure 1.3 – Analytical process

Figure 1.3 – Analytical process

As an analyst, you should have the preceding workflow that will generally go through the following tasks:

  1. You should, first and foremost, scope out the question. You need to understand what is being asked of you clearly. Remember that your stakeholders have immense business knowledge and a problem they need to solve, but more often than not, the question might not be clearly defined.
  2. You must extract the correct datasets to explore the problem space. This might be as easy as extracting a CSV from...

Why Python?

Python offers a marketing analyst many benefits. First, it is an easy but powerful programming language with a great ecosystem of tools and libraries for data analysis and statistics. Second, as a programming language, it is easily testable, and the code can be made in such a way as to be generalizable and reusable. Do not underestimate this second point. Reusability is a great asset to have. You can reuse them for other datasets or testing purposes, which will massively increase your productivity in the medium to long term. Third, it handles massive amounts of data with modern libraries such as pandas and NumPy. The limit is essentially the physical memory in your machine.

Some of you might wonder, “Why not R?”. It is a matter of personal preference. Most marketing analytics was derived from the field of applied econometrics. R is one of the prime tools in econometrics and statistics. As a language, it was built for statisticians who did not want to learn...

Modern challenges in the world of privacy-centric marketing

Marketers and marketing analysts have had the chance to swim in a world of data in the last 20 years. In fact, that was one of the main drivers of the spread of marketing analytics in the field, especially in the area of digital marketing, which accounts for almost two thirds of all marketing spending worldwide. However new trends in the attitude toward privacy and tracking online are making it harder for us, as analysts, to quickly derive insights from available data.

As we can see from Figure 1.4, for years the trend was clear. The largest proportion of marketing budgets went to online and digital marketing:

Figure 1.4 – Evolution of digital marketing spend as a percentage of global marketing spend

Figure 1.4 – Evolution of digital marketing spend as a percentage of global marketing spend

At our disposal, we had highly granular and vast datasets on our users, encompassing their behaviors, which ads they saw, when they saw them, and how they reacted to them. Clickstream data...

The importance of data engineering and tracking

When moving past toy examples, data wrangling and transformation is neither easy nor something to be taken lightly. As described, since most digital marketing spending and interactions are of a digital nature, you are essentially swimming in a sea of data. Your job as an analyst is, as described at the beginning of this chapter, to generate insights in a timely manner. Here, efficient data accessibility is going to become a topic, especially if you work for a larger company with multiple large data sources. While a deeper and thorough walkthrough of data engineering is outside of the scope of this book, as an analyst, you should have a basic understanding of what it is and why it matters.

Don’t moonlight as a data engineer

Excel gives us a bit of a bad habit as analysts: we use it simultaneously as a database and a tool to generate insights. The use of it as a database gives us a false sense of understanding of the need for...

Summary

In this chapter, we delved into what we mean by marketing analytics. We broke down the types of analytics—from descriptive to prescriptive— discussed the value they add to businesses, and learned what questions each of them answers.

We investigated the fundamental questions you are trying to answer—what happened, when did it happen, how did it happen, what will happen in the future, and how can I make something happen. We also covered how they relate to each sub-domain of analytics, and we can now distinguish clearly between descriptive, predictive, diagnostic, and prescriptive analytics.

First, analytics is a complex field that can be summarized as the intersection between statistics, computer science, and analysis. You need to understand that marketing analytics distills those tools and techniques to the efforts of marketing to better optimize spending and obtain a return on investment.

Analytics can be split into question categories that map...

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Analyze marketing data using proper statistical techniques
  • Use data modeling and analytics to understand customer preferences and enhance strategies without complex math
  • Implement Python libraries like DoWhy, Pandas, and Prophet in a business setting with examples and use cases
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

Most marketing professionals are familiar with various sources of customer data that promise insights for success. There are extensive sources of data, from customer surveys to digital marketing data. Moreover, there is an increasing variety of tools and techniques to shape data, from small to big data. However, having the right knowledge and understanding the context of how to use data and tools is crucial. In this book, you’ll learn how to give context to your data and turn it into useful information. You’ll understand how and where to use a tool or dataset for a specific question, exploring the "what and why questions" to provide real value to your stakeholders. Using Python, this book will delve into the basics of analytics and causal inference. Then, you’ll focus on visualization and presentation, followed by understanding guidelines on how to present and condense large amounts of information into KPIs. After learning how to plan ahead and forecast, you’ll delve into customer analytics and insights. Finally, you’ll measure the effectiveness of your marketing efforts and derive insights for data-driven decision-making. By the end of this book, you’ll understand the tools you need to use on specific datasets to provide context and shape your data, as well as to gain information to boost your marketing efforts.

Who is this book for?

This book is for data analysts and data scientists working in a marketing team supporting analytics and marketing research, who want to provide better insights that lead to data-driven decision-making. Prior knowledge of Python, data analysis, and statistics is required to get the most out of this book.

What you will learn

  • Understand the basic ideas behind the main statistical models used in marketing analytics
  • Apply the right models and tools to a specific analytical question
  • Discover how to conduct causal inference, experimentation, and statistical modeling with Python
  • Implement common open source Python libraries for specific use cases with immediately applicable code
  • Analyze customer lifetime data and generate customer insights
  • Go through the different stages of analytics, from descriptive to prescriptive
Estimated delivery fee Deliver to Austria

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 10, 2024
Length: 452 pages
Edition : 1st
Language : English
ISBN-13 : 9781803241609
Category :
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Colour book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Estimated delivery fee Deliver to Austria

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : May 10, 2024
Length: 452 pages
Edition : 1st
Language : English
ISBN-13 : 9781803241609
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 105.97
Extending Excel with Python and R
€33.99
Python Data Cleaning Cookbook
€37.99
Data Analytics for Marketing
€33.99
Total 105.97 Stars icon

Table of Contents

19 Chapters
Part 1: Fundamentals of Analytics Chevron down icon Chevron up icon
Chapter 1: What is Marketing Analytics? Chevron down icon Chevron up icon
Chapter 2: Extracting and Exploring Data with Singer and pandas Chevron down icon Chevron up icon
Chapter 3: Design Principles and Presenting Results with Streamlit Chevron down icon Chevron up icon
Chapter 4: Econometrics and Causal Inference with Statsmodels and PyMC Chevron down icon Chevron up icon
Part 2: Planning Ahead Chevron down icon Chevron up icon
Chapter 5: Forecasting with Prophet, ARIMA, and Other Models Using StatsForecast Chevron down icon Chevron up icon
Chapter 6: Anomaly Detection with StatsForecast and PyMC Chevron down icon Chevron up icon
Part 3: Who and What to Target Chevron down icon Chevron up icon
Chapter 7: Customer Insights – Segmentation and RFM Chevron down icon Chevron up icon
Chapter 8: Customer Lifetime Value with PyMC Marketing Chevron down icon Chevron up icon
Chapter 9: Customer Survey Analysis Chevron down icon Chevron up icon
Chapter 10: Conjoint Analysis with pandas and Statsmodels Chevron down icon Chevron up icon
Part 4: Measuring Effectiveness Chevron down icon Chevron up icon
Chapter 11: Multi-Touch Digital Attribution Chevron down icon Chevron up icon
Chapter 12: Media Mix Modeling with PyMC Marketing Chevron down icon Chevron up icon
Chapter 13: Running Experiments with PyMC Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(2 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Praise Ifetogun Jul 12, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book masterfully covers the entire range of marketing analytics, from the basics of extracting and exploring data to advanced topics like econometrics, forecasting, and customer lifetime value analysis. It strikes a perfect balance between theory and practical application, ensuring readers can both understand and implement the techniques discussed.One of the standout features of this book is its clarity and accessibility. Complex concepts are broken down into understandable segments, supported by real-world examples and practical exercises. Whether you're looking to design compelling dashboards with Streamlit or delve into the intricacies of multi-touch digital attribution and media mix modeling, this book provides the tools and knowledge needed to excel. "Data Analytics for Marketing" is not just a read but a comprehensive resource that will stay on your desk as a go-to reference in your analytics journey.
Amazon Verified review Amazon
Seraf Sep 23, 2024
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
A book I have difficulty getting in it. I mean, look at the equation expressions... hard to read. The editor hasn't done its job? But, still readable.
Subscriber review Packt
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela