Uploaded May 2023 | Updated September 2026, 2 weeks ago
In this video, we'll imagine a mock scenario where the Developer team needs you to query Google Analytics to get the most popular posts from the past 24 hours, using Python, and writing that data to a JSON file, where the dev team can then apply it to the website's trending posts.
We'll learn
- How to set up a Google project and correct permissions to access the Google Analytics Data API
- How to interact with the Google Analytics 4 API with Python
- How to effectively read documentation
- How to retrieve the 5 most popular posts from Google Analytics using Python
- How to write this data to a file
I'll prompt you with opportunities to write the code and find the solution, yourself.
Timestamps
00:00 Intro
00:30 The scenario
01:14 Visual example and explanation
02:08 Set up Python environment
03:16 Google Analytics API documentation
03:42 Enable the API
05:36 Add service account to property
06:57 Configure authentication
07:48 Install client library
08:21 Make API call
09:59 Writing Python script
13:55 Your turn - pseudocode
16:02 My solution
18:33 Write data to file
20:18 Want to see the automation?
** Career Path Coding Tracks **
Web Developer - geni.us/jBigBd
Software Engineer - geni.us/AbMxjrX
Machine Learning - geni.us/GporLlT
Python Developer - geni.us/tv2FJBU
DevOps Engineer - geni.us/MgHtJ
** My Coding Blueprints **
Learn to Code Web Developer Blueprint - geni.us/HoswN2
AWS/Python Blueprint - geni.us/yGlFaRe
** I write regularly **
https://travis.media
** FREE EBOOKS **
π https://travis.media/ebooks
LET'S CONNECT!
π° LinkedIn β https://www.linkedin.com/in/travisdot...
π¦ Twitter β twitter.com/travisdotmediaβ
ππΌββοΈ Website β https://travis.media
#googleanalytics4 #pythonprogramming #devops
** Some of the links in this description may be affiliate links that I may get a little cut of. Thank you.
In this video, we'll imagine a mock scenario where the Developer team needs you to query Google Analytics to get the most popular posts from the past 24 hours, using Python, and writing that data to a JSON file, where the dev team can then apply it to the website's trending posts.
We'll learn
- How to set up a Google project and correct permissions to access the Google Analytics Data API
- How to interact with the Google Analytics 4 API with Python
- How to effectively read documentation
- How to retrieve the 5 most popular posts from Google Analytics using Python
- How to write this data to a file
I'll prompt you with opportunities to write the code and find the solution, yourself.
Timestamps
00:00 Intro
00:30 The scenario
01:14 Visual example and explanation
02:08 Set up Python environment
03:16 Google Analytics API documentation
03:42 Enable the API
05:36 Add service account to property
06:57 Configure authentication
07:48 Install client library
08:21 Make API call
09:59 Writing Python script
13:55 Your turn - pseudocode
16:02 My solution
18:33 Write data to file
20:18 Want to see the automation?
** Career Path Coding Tracks **
Web Developer - geni.us/jBigBd
Software Engineer - geni.us/AbMxjrX
Machine Learning - geni.us/GporLlT
Python Developer - geni.us/tv2FJBU
DevOps Engineer - geni.us/MgHtJ
** My Coding Blueprints **
Learn to Code Web Developer Blueprint - geni.us/HoswN2
AWS/Python Blueprint - geni.us/yGlFaRe
** I write regularly **
https://travis.media
** FREE EBOOKS **
π https://travis.media/ebooks
LET'S CONNECT!
π° LinkedIn β https://www.linkedin.com/in/travisdot...
π¦ Twitter β twitter.com/travisdotmediaβ
ππΌββοΈ Website β https://travis.media
#googleanalytics4 #pythonprogramming #devops
** Some of the links in this description may be affiliate links that I may get a little cut of. Thank you.










![Learn These 10 AI Concepts Before Itβs Too Late
To learn for free on Brilliant, go to https://brilliant.org/TravisMedia/ . Youβll also get 20% off an annual premium subscription.
AI is becoming core knowledge in modern software development. Even if you donβt specialize in ML, youβll be asked to build, integrate, or maintain AI features.
This video servers to explain 10 essential machine learning and AI concepts for developers: model parameters, quantization, embeddings & vector databases, retrieval augmented generation, inference, tokens & context windows, guardrails, function calling, memory, and cost/rate limits, so you can ship reliable, cost-efficient AI features with confidence.
Resources mentioned:
Blog: Model Parameters (2B vs 7B vs 40B) β https://travis.media/blog/ai-model-parameters-explained]
Blog: Quantization (4-bit, 8-bit, VRAM math) βhttps://travis.media/blog/ai-model-quantization-explained/
Tokenizer tool β https://platform.openai.com/tokenizer
Thanks Brilliant for sponsoring this video
Chapters
00:00 Intro
01:00 1 - Parameters
02:09 2- Quantization
03:24 3- Embeddings & Vector databases
04:52 Sponsor
06:10 4- RAG
07:28 5 - Inference
08:15 6 - Tokens & Context Windows
09:58 7 - Guardrails
11:01 8 - Function Calling
12:19 9 - Memory
13:17 10 - Cost & Rate Limits
14:15 Did you know all 10?
π₯ Watch These Next π₯
https://youtu.be/uDcb12CqoR4
https://youtu.be/EMWNZtCYg5s
https://youtu.be/jUOysN-rcyQ
FOLLOW ME ON
Twitter - https://x.com/travisdotmedia
LinkedIn - https://linkedin.com/in/travisdotmedia
FAVORITE TOOLS AND APPS:
Udemy deals, updated regularly - https://travis.media/udemy
ZeroToMastery - https://geni.us/AbMxjrX
Camera - https://amzn.to/3LOUFZV
Lens - https://amzn.to/4fyadP0
Microphone - https://amzn.to/3sAwyrH
** My Coding Blueprints **
Learn to Code Web Developer Blueprint - https://geni.us/HoswN2
AWS/Python Blueprint - https://geni.us/yGlFaRe - FREE
Both FREE in the Travis Media Community - https://imposterdevs.com
FREE EBOOKS
π https://travis.media/ebooks
#ai #machinelearning #selftaughtdeveloper Learn These 10 AI Concepts Before Itβs Too Late](https://i.ytimg.com/vi/pXCRkyLhXDY/mqdefault.jpg)