Chapter 2
:  
Events in GA4
  >  
Events

What are events?

About this lesson:

Google analytics 4 event overview

Become a member of the F'in Pro community tier to access this course.
Events in GA4: Now we will use jQuery to extract product information from a Webflow page and post the data to our Google Analytics instance using the gtag.js library.

An event is any action on your website that you may want to record. It may be a user purchase, a product view or a remove from cart. Google Analytics 4 offers powerful event tracking functionality that allows us to customize data that goes into Google Analytics. We will mix our custom event tracking with automatic Google Analytics statistics.

Here in this code snippet we replace THE EVENT with the name of the event we want to send to gtag. For example, if we want to tell Google Analytics that someone viewed a list of items on our site we would replace THE EVENT with Google's provided view_item_list event. We will cover many event types and how we can send these events to Google.

Based on the event we are sending, Google gives us different 'object keys' in the gtag.js documentation to deliver values. The values we send are the product specific information from your website.

It's important to know that these object keys can not be changed.

In this example, we are sending a view_item_list event to Google. With this event, we are sending more meaningful information about items, list name, and list id. We recommend to use the provided object keys that Google gives us in the documentation - items, item_list_name, and item_list_id.

This concept applies to all pages, videos, and implementations of this code.

[Before </body> tag] https://raw.githubusercontent.com/finsweet/ga_course/main/events/event_fomart.html
Chapter 2
Events in GA4
Events
What are events?

Note: Please do not share the Webflow cloneable publicy, or with anyone who hasn't purchased the course.

The cloneable and the course contents are for your eyes only.