Being Technical Writer
    • Home
    • Categories
    • Videos
    Jekyll

    Jekyll GA4 Setup Guide: Save Your Analytics Data Before It's Lost Forever!

    <a href='/aboutme/'>Gaurav Trivedi</a> Gaurav Trivedi
    May 29, 2022
    4 min read
    Jekyll GA4 Setup Guide: Save Your Analytics Data Before It's Lost Forever!

    Implementing Google Analytics four (GA4) property

    Do you use standard Google Universal Analytics (UA) on your Jekyll Blog? If yes, then the time is ripe for you to use GA4 instead of UA property.

    Why do you need to use the GA4 property?

    Google has stated that it would cease processing new data in standard properties starting July 1, 2023. Yes, you have time, but don’t you want to compare Universal Analytics properties to GA4 properties? Don’t you want to import your existing data into the Google Analytics4 property?

    How to set up Google Analytics4 properties?

    Prerequisites

    1. You have a Google Analytics account.
    2. You have already enabled Google Analytics for your website.

    Procedures

    1. Sign in to your Google Analytics account.
    2. Click the icon. The system displays three columns; Account, Property, and View.
    3. In the Property column, select GA4 Setup Assistant, and click Get Started.

      Note: If you have used the gtag.js (a JavaScript library) tag in your Jekyll website, GA4 offers you to Enable data collection using your existing tags.
    4. Click Create Property. The system displays your GA4 property name (G-xxxxxxxxxx) and a message indicating that you have successfully connected your properties.

      Good to know: The setup wizard:
      * Creates a new GA4 property
      * Copies the name, URL, timezone, and other settings from your existing property
      * Activates the enhanced measurement
      * Establishes a connection between Standard Analytics and GA4 properties
    5. Copy and save your GA4 property name for future use.

    What changes do you need in your Jekyll website?

    You now have a GA4 property name. Use it on your Jekyll website.

    Procedures

    1. Browse to the location where you have used the gtag.js (a JavaScript library) tag.

      Good to know: Generally, users include the gtag.js at the head of the Default layout. Additionally, you may have placed the Google Analytics (gtag.js tag) code in your _includes folder.
    2. You have two options, either add the GA4 property name or update the entire Google Analytics code.

      Note: If you go later, you will lose the ability to track your website data using Universal Analytics. Therefore, it is best to add the GA4 property name to your Google Analytics code.
    3. Add the GA4 property name to your Google Analytics code.

      <!-- Global site tag (gtag.js) - Google Analytics -->
      <script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-x"></script>
      <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
      
         gtag('config', 'UA-xxxxxxxxx-x');
         gtag('config', 'G-xxxxxxxxxx');
      </script>
      
      

      UA-xxxxxxxxx-x = Your Universal Analytics property.

      G-xxxxxxxxxx = Your GA4 property.

    How to Verify Your GA4 Setup is Working Correctly

    After implementing GA4, follow these verification steps to ensure it’s tracking properly:

    1. Check real-time reports: Visit your GA4 property and go to Reports > Realtime. Open your Jekyll site in another tab and navigate through a few pages. You should see activity in your real-time report.

    2. Verify events are tracking: GA4 automatically tracks page views as events. Check Reports > Events to confirm these are being recorded.

    3. Set up additional events: Consider tracking important user actions such as:

      • File downloads
      • Outbound link clicks
      • Form submissions
      • Scroll depth

    Next Steps: Getting the Most from GA4

    Now that you’ve successfully implemented GA4 on your Jekyll site, take these additional steps:

    1. Set up conversion events to track important goals
    2. Create custom explorations to analyze your data in depth
    3. Connect GA4 to Google Search Console for comprehensive SEO insights

    Need help implementing advanced GA4 features on your Jekyll site? Contact me for personalized assistance or leave a comment below with your specific questions!

    Congratulations! You have successfully configured your Jekyll website to use Google Analytics four (GA4) property. You may need to wait for 48 hours for data to appear in your GA4 property.

    Previous Article

    How to Add Lightning-Fast Search to Your Jekyll Blog in 4 Simple Steps

    Transform your Jekyll site with instant search functionality in just minutes!...
    Next Article

    Navigating Uncertain Times - How Investing in Yourself Can Lead to Success

    In this blog post, I've explained my learning strategy. I've been following t...

    Share This Post

    You Might Also Like

    I Built a Gamified 365-Day AI Learning App in One Evening—Want to Join Me on This Journey?
    I Built a Gamified 365-Day AI Learning App in One Evening—Want to Join Me on This Journey?
    Oct 22, 2025
    I Tested Google I/O 2025 Tools Over the Weekend—Here's What Actually Changes for Technical Writers
    I Tested Google I/O 2025 Tools Over the Weekend—Here's What Actually Changes for Technical Writers
    May 25, 2025
    From prototype to co-pilot - Launching the mini AI writing assistant for technical style enforcement
    From prototype to co-pilot - Launching the mini AI writing assistant for technical style enforcement
    May 15, 2025
    View All Posts

    Categories

    Jekyll Explore articles
    Technical Writing Explore articles
    Git Explore articles
    Innovation Explore articles
    AI Explore articles

    Join the Discussion

    Being Technical Writer

    Empowering technical writers with insights, innovations, and industry best practices to excel in the ever-evolving world of technical communication.

    Quick Links

    About me Contact

    Resources

    Site analytics

    Premium Courses

    Contact me for one-on-one mentoring sessions.

    Like the content?

    © 2025 Being Technical Writer. The opinions expressed in this blog are my own, and not those of my employer.

    Privacy policy