Google Analytics 4 (GA4)
Last updated
Last updated
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.
📱Device Mode
✅
✅
☁️Cloud Mode
🚫
🚫
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.
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 .
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.
Measurement ID
The measurement ID associated with your account. You can navigate to Google Analytics UI under: Admin > Data Streams > choose your stream > Measurement ID
Step 2: Add the below configuration to the main.dart
file:
Dart:
projectName
Your project name
appId
Your app ID
apiKey
Your app API key
projectId
Your project ID
messagingSenderId
Your unique sender ID
enable
Flag to toggle sending events to GA4 (default: false)
Some recommended events are listed below. With Lemnisk SDK, you can map your events with GA4-recommended events.
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.
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.
Step 1: Follow the steps to initialize the SDK .
To add GA4 destination to Flutter SDK, follow the steps to initialize the SDK . Then add the following configuration:
You can refer to the to know more about the events.
You can refer to the document to know more.