Marketing Analytics Project
GA4 Marketing Analytics Pipeline
Exploring how users discovered and interacted with ByrdieOnTheRocks during the last 6 months using Python, pandas, and the Google Analytics 4 Data API.
Project Overview
Understanding how users discover a website can help identify which traffic sources, locations, and content contribute most to its performance.
In this project, I used the Google Analytics 4 Data API to retrieve website traffic data from ByrdieOnTheRocks . I then prepared and analysed the data with Python to understand daily active users, traffic sources, geographic audiences, and top landing pages during the last 6 months.
Questions I Wanted to Explore
- How did daily active users change over time?
- Which traffic sources generated the most active users?
- Which countries generated the most website traffic?
- Which landing pages received the most active users?
Data Source
The data was retrieved from the Google Analytics 4 Data API for the last 6 months.
The analysis includes:
- Daily active users
- Session default channel groups
- Active users by country
- Landing pages by active users
OAuth credentials, authentication tokens, the GA4 property ID, and raw GA4 exports are not included in the public repository.
Approach
- Connected to the Google Analytics 4 Data API using OAuth authentication.
- Created API requests for each website traffic report.
- Converted the API responses into pandas DataFrames.
- Prepared and checked the data before analysis.
- Created charts with Matplotlib.
- Reviewed the results and identified useful marketing insights.
Key Insights
Direct and Organic Search generated most traffic
Direct was the largest traffic source during the last 6 months, followed closely by Organic Search. This shows that search engines were also an important way for users to discover the website.
Singapore generated the most active users
Singapore ranked first for active users, followed by the United States and Thailand. The results show that the website reached users across several countries.
Thailand climbing content ranked highest
The top two landing pages were Thailand-focused climbing content. Best Climbing Spots in Thailand for Beginners ranked as the top landing page.
What I Learned
This project helped me practise connecting to the GA4 Data API, retrieving analytics data, preparing API responses with pandas, and creating charts with Matplotlib.
It also showed me how GA4 data can be used to understand where website traffic comes from and which content attracts users. The results provide a baseline for future comparisons as the website continues to grow.
Explore the Full Analysis
The complete notebook, code, charts, and documentation are available on GitHub.
← Back to Projects