How to know your website performance in real-time, daily, weekly, monthly, etc.? Google Analytics 4 (GA4) is a savior here! Our Magento 2 Google Analytics 4 extension helps to directly integrate GA4 and your store by filling in the GA4 measurement ID.
With just one step, you will be able to track, record, and view crucial data for your eCommerce business right in your Google Analytics account. Keep track of your purchases, cart additions, impressions, and overall user activity and confidently plan your next move.
2. How Does It Work?
Please go to Stores ⇒ Configuration ⇒ BSSCOMMERCE ⇒ Google Analytics 4.
2.1. General Config
- In Enable, choose Yes to enable or No to disable the module.
- Measurement ID: Fill in your GA4 Measurement ID. Check the instructions below (part 2.2) to set up data streams and get the Measurement ID.
- Product Identifier: Allow store owners to choose attributes to identify products imported to GA4: ID or SKU.
- Enable Brand: Choose Yes to add param item_brand to the item’s data; otherwise, choose No. (The default is No)
- Brand Attribute includes all product attributes (system and custom) on site. This config allows the store owner to choose identified attributes for the product’s brand.
- Enable Affiliation: Choose Yes to add param affiliation to the item’s data; otherwise, choose No. (The default is No)
- Affiliation Attribute includes all product attributes (system and custom) on site. This config allows the store owner to choose identified attributes for the product’s affiliation.
Next, you can also customize the value of the transaction:
- Get price of bundle product by: There’re 3 options: min, max and average to choose from. This function helps admin to decide which bundle price will be listed on GA4.
- Exclude Shipping From Transaction: Choose Yes if you don’t want to calculate shipping costs to transactions listed on GA4. Otherwise, select No. (The default is No)
- Exclude Orders with 0 value: Choose Yes if you don’t want to list Orders with 0 value on GA4. Otherwise, select No. (The default is No)
2.2. How To Get GA4 Measurement ID
2.2.1. Create an Analytics account if you haven’t had one yet
Step 1: Go to Admin => Account column => Create Account.
Step 2: Fill out the account name and set up the data-sharing to monitor which data you share with Google.
Step 3: Click Next
2.2.2. Create a property
Step 1: In Admin => Property column => Create Property
Step 2: Enter a name for the property. Then, select the reporting time zone and currency.
Step 3: Choose Next. Select your industry classification and company size.
Step 4: Click Create.
2.2.3. Add a data stream
Click Web => Enter your website URL => Enable enhanced measurement if you want to use eCommerce tracking => Create stream.
2.2.4. Get your measurement ID
Paste your "G-" ID into the Measurement ID field that the module provides. Your "G-" ID appears at the upper right.
* Note: Starting the data collection process could take up to 30 minutes. The real-time report or debug mode can confirm that you are receiving data.
You need to install and enable the Google Analytics Debugger extension to enable debug mode in your browser.