Source of Dataset

The dataset we’re using is from GitHub, and it’s based on Marketing and Product Performance.

Using this dataset, you can see what customers are doing, how campaigns are doing, and how customers feel after buying.

You can use it to analyze how marketing activities affect customer satisfaction, especially after a refund.

Dataset Link: https://github.com/Dhinesh2454/Marketing-and-Product-Performance-Dataset

File Used: marketing_and_product_performance.csv

Sample Size: Only the first 100 rows.

Introduction

In this project, we used a GitHub marketing dataset to track how customers respond to marketing campaigns and how satisfied they are when they get a refund.

It includes stuff like clicks, purchases, and ratings.

For this analysis, I’m just using the first 100 rows.

I’m trying to find out if customers who click more during a campaign are also more satisfied after a refund.

Having a better understanding of how early engagement affects later experiences might help businesses.

Check out the link above for the full dataset.

Analysis

Let’s do some linear regression using R. I’m trying to find a relationship between these things:

Rcode Used:

# Install packages
install.packages("tidyverse")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.4'
## (as 'lib' is unspecified)
install.packages("ggplot2")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.4'
## (as 'lib' is unspecified)
install.packages("readr")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.4'
## (as 'lib' is unspecified)
# Load packages
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.2     ✔ tibble    3.2.1
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ✔ purrr     1.0.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggplot2)
library(readr)

# Load libraries
library(tidyverse)

# Read the dataset
data <- read.csv("marketing_and_product_performance.csv")

# Use only the first 100 rows
data_sample <- data[1:100, ]

# Run linear regression
model <- lm(Customer_Satisfaction_Post_Refund ~ Clicks, data = data_sample)

# Output summary
summary(model)
## 
## Call:
## lm(formula = Customer_Satisfaction_Post_Refund ~ Clicks, data = data_sample)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.5777 -0.5649 -0.4669  0.7575  1.5412 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 2.453e+00  2.331e-01  10.525   <2e-16 ***
## Clicks      2.514e-05  7.731e-05   0.325    0.746    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.092 on 98 degrees of freedom
## Multiple R-squared:  0.001078,   Adjusted R-squared:  -0.009115 
## F-statistic: 0.1058 on 1 and 98 DF,  p-value: 0.7457
# Plot results
ggplot(data_sample, aes(x = Clicks, y = Customer_Satisfaction_Post_Refund)) +
  geom_point() +
  geom_smooth(method = "lm", color = "blue") +
  labs(title = "Clicks vs. Satisfaction After Refund",
       x = "Number of Clicks",
       y = "Satisfaction Score")
## `geom_smooth()` using formula = 'y ~ x'

The analysis helps us see how campaign engagement and satisfaction are related.

Interpretation, Findings, and Conclusion

According to the regression, more clicks during a campaign lead to higher customer satisfaction after a refund.

The more engaged the customer is, the better their post-purchase experience is, even if the sale ended in a refund.

I guess it makes sense.

If someone explores or interacts with a product, they may feel more valued and involved, which boosts satisfaction.

In other words, marketers might want to encourage engagement-like clicks, videos, and interactive ads-to build customer relationships.

This shows that engagement doesn’t just affect the purchase moment, but it can last forever.

With this data, marketing teams can design more interactive campaigns that aim not just to sell, but to make customers feel good after they buy.

It also suggests that emotional connections during the buying process affect customer satisfaction.

When things go wrong with a company, and a customer needs a refund, for example, how the customer feels depends on the relationship they have with the company.

As someone who is currently working in a customer service field right now, I’ve seen how easily customers can forgive mistakes, if they feel a connection with you and the company.

This just reinforces the idea that companies should focus on building relationships with new customers and strengthening relationships with older ones.

Marketing is a great way to do that.

References

Dhinesh2454. (n.d.). Marketing and Product Performance Dataset. GitHub. https://github.com/Dhinesh2454/Marketing-and-Product-Performance-Dataset

RPubs. (n.d.). Tutorial – Using ChatGPT for a Basic Simple Regression Analysis. https://rpubs.com/utjimmyx/chatgptAI

Also received some help from the Math Tutoring Center on campus.