Google Analytics 4 (GA4)
Google Analytics 4 is the most powerful and popular analytics tool available. It is used to track and report traffic for both websites and applications across a variety of sources. With Google Analytics 4, you can uncover insights and gain a deeper understanding of your customers across devices and platforms with machine learning.
Connection
Connection | Web | Mobile |
---|---|---|
📱Device Mode | ✅ | ✅ |
☁️Cloud Mode | 🚫 | 🚫 |
Use Cases of GA4
Fewer settings are required since data mapping is done during configuration for action-based destinations.
Data mapping is made much clearer. With action-based destinations, you can define the mapping between the data segments you receive from your source and the data segments you send to Google Analytics 4.
Mappings for recommended Google Analytics 4 events are prebuilt and can be customized.
Google Analytics 4 supports multi-product arrays. An analytics tool can be used to analyze products nested within arrays, such as those in the order completed event.
GA4 helps you to see users moving on your site and between subdomains accurately. Therefore, you can see how your visitors are interacting with your site without needing multiple views.
Getting started
First, you'll have to configure a Google Analytics 4 property in your Analytics account. You can refer to Google’s article on how to Set up Analytics for a website and/or app.
After configuring GA4 in your analytics account, please provide the measurement ID and API Secret associated with your GA4 account to our customer success or delivery team. We will further help you set up the account.
Destination | Description |
---|---|
| The measurement ID associated with your account. You can navigate to Google Analytics UI under: Admin > Data Streams > choose your stream > Measurement ID |
Configuring GA4 for Flutter SDK
Step 1: Follow the steps to initialize the SDK here.
Step 2: Add the below configuration to the main.dart
file:
Add Google Analytics 4 to Flutter SDK
To add GA4 destination to Flutter SDK, follow the steps to initialize the SDK here. Then add the following configuration:
Dart:
Parameter | Description |
---|---|
| Your project name |
| Your app ID |
| Your app API key |
| Your project ID |
| Your unique sender ID |
| Flag to toggle sending events to GA4 (default: false) |
Recommended Events
You can refer to the Recommended events to know more about the events.
Some recommended events are listed below. With Lemnisk SDK, you can map your events with GA4-recommended events.
Event | Description |
---|---|
Page View | You can send this event when a user views a page. |
View Item List | You can send this event when a user views a list of items. |
Add to Cart | You can send this event when a user adds items to the cart. |
Purchase | You can send this event when a user completes a purchase. |
Login | You can send this event when a user logs in. |
For any mapping requirements, feel free to contact us.
Custom Events
You will first have to create custom dimensions and metrics within the Google Analytics 4 account and link the event parameters to their corresponding dimension or metrics. As you create the dimension or metric, you can either select a parameter from the list of already collected fields or enter the name of the parameter you wish to collect in the future.
You can refer to the Custom dimensions document to know more.
Last updated