Python and Google Analytics 4 Tutorial | Most Popular Posts

Поділитися
Вставка
  • Опубліковано 6 чер 2024
  • 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 **
    travis.media
    ** FREE EBOOKS **
    📘 travis.media/ebooks
    LET'S CONNECT!
    📰 LinkedIn ➔ / travisdot. .
    🐦 Twitter ➔ / travisdotmedia​
    🙋🏼‍♂️ Website ➔ 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.
  • Наука та технологія

КОМЕНТАРІ • 20

  • @i--vik1007
    @i--vik1007 Рік тому +1

    Travis, because of you i am hesding on full speed to become a better
    Software engineer, thank you for all you do.

  • @carlosallan9349
    @carlosallan9349 5 місяців тому

    Gotta say, that was the best video about it that i found. All the others the code didn't worked and or i had a problem, in this one i also had a problem, i needed to run it in Asyncio, but it was easy to fix! Great video, keep it up!

  • @mariumbegum7325
    @mariumbegum7325 Рік тому

    Insightful video, looking forward to seeing more 😄

  • @HarisKhan-ph9jl
    @HarisKhan-ph9jl 9 місяців тому

    The only tutorial that helps me. Thank you so much.

  • @carlosallan9349
    @carlosallan9349 5 місяців тому +2

    Also! Would love to see the automation part!! I'm working in a personal project and the automation part would help a lot! Sadly there's not much content using Python and Google Analytics up to date!

  • @RamC-re5cd
    @RamC-re5cd 6 місяців тому

    I really liked your video! Thanks a lot for explaining everything so clearly. I did exactly what you showed in the video, and it worked perfectly for me. When you talked about automating the process at the end, I got interested. It would be awesome if you could make a video on that too. Thanks again!

  • @SerhiiYashchuk
    @SerhiiYashchuk 5 місяців тому

    Hello. Thank you for great explanation with live examples, subscribed and liked))

  • @jayjay8094
    @jayjay8094 Рік тому +1

    Looking forward to the automation segment.
    Cheers.

  • @YuriFontella
    @YuriFontella 7 місяців тому

    thanks

  • @maxwiili
    @maxwiili Рік тому

    Hey @Travis Media I really appreciated your AWS amd python videos a lot!!!.I am curious to know whether that series was still on-going?

    • @TravisMedia
      @TravisMedia  Рік тому

      Yes, I’m planning more, thanks for asking. Anything particular you’d like to see?

  • @seve-fn1mo
    @seve-fn1mo 8 місяців тому

    Why you don't need to 'enable billing' on the 'install client library' steps? it seems to work without enabling billing which is contradictive with the current docs lol. Do you possibly know the reason and could assist me?

  • @Md65532
    @Md65532 Рік тому

    Hello sir ! I am 2 year btech student should i go for cloud & Devops in terms of job in India ??

  • @henrychoi3809
    @henrychoi3809 7 місяців тому

    Hi Travis, thank you very much for the video. I have a bit problem with retrieving data from GA4. I added the error script to troubleshoot and found out Python is giving the error message "File service_account.json is not a valid json file.' , JSONDecodeError('Expecting value: line 1 cloumn 1 (char 0)')". Do you have any idea how's this happened?

  • @kannadastocktrader3369
    @kannadastocktrader3369 10 місяців тому

    Sir GA4 requires 24 hours to mature oresle thr not set will be seen more will this python extraction method will solve this issue

  • @ccc_ccc789
    @ccc_ccc789 4 місяці тому

    Is there a way to download the raw data from GA4 using python? I mean the GA4 raw data that are not aggregated by metrics and dimensions.

  • @GregoryGustavo
    @GregoryGustavo Рік тому

    i need this on realtime, but pagepath or fullurlpage is not a dimension valid

    • @highvibe4u
      @highvibe4u 6 місяців тому

      Can you please assist to get this data in real time to Kafka topic

  • @kannadastocktrader3369
    @kannadastocktrader3369 10 місяців тому

    Automation is required