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.

  4. Click Create Property. The system displays your GA4 property name (G-xxxxxxxxxx) and a message indicating that you have successfully connected your 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.

  2. You have two options, either add the GA4 property name or update the entire 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.