GA4: event tracking

 

This short guide will help you to setup and track GA4 events.

GA4 property setup

  1. You need to setup GA4 property according to Google instructions.

  2. When GA4 property already set up you need to install gtag.js code to your website.

  3. Go to Admin settings in Google Analytics.

  4. Select Data Streams

  5. Open your website’s stream

  6. In Web stream details go to Configure Tag Settings

  7. Select Installation Instructions

  8. In Installation instructions section you can scan your website or select your website’s platform manually to get instructions

  9. Or you can select Install manually section and get gtag.js code that should be installed in website’s <head> element to every page that you want to track.

  10. Embed code looks like

    <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-GHY8WW59SZ"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-GHY8WW59SZ'); </script>
  11. In case you have already gtag.js code installed on website but with UA property (UA-.....) we highly recommend to change it to GA4 property (G-.....).

  12.  

Setup custom definitions

  1. Go to Admin settings

  2. Click on Custom Definitions in Data display section

  3. Create custom dimension.

  4. To expand data that will be shown in reports you can use up to 3 event parameters:

    1. event_category

    2. event_label

    3. value

  5. Scope should be Event.

  6. Then you will find these dimensions in reports EngagementEvents.

  7. All TC events has TCW prefix so you can use it to filter events.

  8. And approximately after 24 hours you will see new dimensions