Integrating Google Analytics 4 (GA4)
The Google Analytics 4 integration allows you to import product performance data directly into your Lengow catalogue.
Once imported, this data becomes available as additional catalogue fields and can be reused across rules, segments, exclusions, and optimisations. This enables you to build more performance-driven strategies using real business signals from GA4.
⚠️ Before you start
Before configuring the integration, ensure you have the following:
- A valid Google Analytics 4 (GA4) account: The Google account used for the connection must have access to your GA4 property.
- Sufficient access rights: Your Google account must have at least Viewer permissions in Google Analytics. Without these permissions, you will be unable to complete the setup or access your data.
- Matching product identifiers: The product IDs in your Lengow catalogue must perfectly match the identifiers tracked in your GA4 events.
Step-by-Step configuration guide
Step 1: Open the Apps section
Navigate to the Apps section in the left-hand menu and search for "Google Analytics 4".
Step 2: Connect your Google account
Click the Sign in with Google button.
Authorize Lengow to access your Google Analytics account.
Once connected, a confirmation message will appear.
Step 3: Choose the catalogue to enrich
Click Choose a catalogue to select which catalogue will receive the Google Analytics data (additional dimensions and metrics).
⚠️ Important: A catalogue can only be linked to one Google Analytics configuration at a time.
Step 4: Name your source
Give your Google Analytics additional source a clear name (e.g., Google Analytics, GA4 France, GA4 Main Store). This name will help you easily identify the integration later in your catalogue settings.
Step 5: Select your GA4 account and property
From the dropdown menus, choose:
Google Analytics account: The Google account containing your analytics data.
Property (Web or App): The specific GA4 property from which data will be imported.
Step 6: Match products between Lengow and GA4
Select the common Product identifier used to link your Lengow catalogue products with your GA4 products (e.g., Product_ID, sku, item_id..).
⚠️ Critical Step: The selected identifier must exactly match the identifier sent in your GA4 tracking events. If they do not match, performance data cannot be associated with your products.
Step 7: Select Dimensions and Metrics
This is the core of your integration. Note that Google limits imports to up to 8 dimensions and up to 10 metrics.
1. Choose your Dimensions Dimensions are descriptive or textual data used to segment and analyze performance. Tick the boxes for the dimensions you want to import (e.g., Product name, Brand, Event name).
2. Choose your Metrics Metrics are numerical performance indicators that measure product engagement. Tick the boxes for the metrics you want to import (e.g., Product detail views, Products purchased, Product revenue).
Step 8: Define the data timeframe
Choose the time window used to aggregate your GA4 data (e.g., Last 7 days, Last 30 days, Last 90 days).
Recommendation: Shorter periods allow for highly reactive optimizations, while longer periods provide smoother, more stable performance trends.
Once you have selected your timeframe, click Save configuration.
What Happens Next?
Automatic Field Creation
Once the configuration is saved, Lengow automatically creates new fields in your catalogue corresponding to the dimensions and metrics you selected.
How to Use Imported Data
Your new GA4 fields become fully reusable across the Lengow platform. You can use them to create data-driven feed management strategies:
Rules: Increase visibility for products with high revenue.
Segments: Segment products with a low engagement rate.
Exclusions: Exclude products with zero sessions.
Optimisation: Prioritize products with high add-to-cart rates.
Monitoring Synchronization
You can monitor the integration from your dashboard, which displays the connected catalogue, imported fields, sync status, and the last synchronisation date.
A successful synchronisation confirms your catalogue is enriched and ready to use!
Advanced Use Case: Handling Multi-Dimensional GA4 Data
The Challenge
Google Analytics 4 returns one row for each unique combination of requested dimensions. When a single product appears under several different events, variants, or traffic channels, its data spreads across multiple rows.
Previously, our catalog indexer (which keys on the Product ID) only kept the last row processed, silently dropping the others. This is why you might have occasionally seen negative itemRevenue values in Lengow: a refund row would overwrite the original purchase row, leaving only the negative amount visible.
The Solution: Data Folding
To solve this, Lengow now folds all of a product's rows into a single comprehensive row without losing the contextual data that distinguishes them.
How it works:
For each dimension, the system analyzes your data to see if the dimension has the same value across all rows for a given product.
Consistent values: If the value is identical across all rows (which is typically the case for attributes like Name, Brand, or Category), it remains a normal, standalone column.
Variable values: If the value varies across rows, it is treated as a "breakdown" dimension. The system folds it directly into the metric values as a descriptive label.
Metric Formatting Rules
Depending on how many meaningful values remain for a product, the metrics are formatted as follows:
Zero values are dropped: Useless zero values are discarded first (e.g., itemRevenue is always 0 on a view_item event, so there is no point in keeping it).
One value left: The value is shown as-is, with no label.
Several values left: Values are shown as label: value segments, joined by a semicolon (;), and sorted alphabetically.
Nothing left: The value falls back to 0.
💡 Pro Tip: When several breakdown dimensions vary at the same time, their values are joined with a pipe (|) to form the label (e.g., black|purchase: 410).
Concrete Examples
| Situation | Result |
|---|---|
| itemRevenue for a product with purchase=312, refund=-58 | purchase: 312; refund: -58 |
| itemRevenue for a product with purchase=647, view_item=0 | 647 (zero dropped, only one left) |
| itemRevenue broken down by variant and event | black|purchase: 410; red|purchase: 312 |
Examples in Practice
Here are a few visual examples comparing how the folded data appears within Lengow based on your GA4 analytics:
1. Analytics Baseline for Comparison
Below is a standard view of the raw analytics data before folding.
2. With both itemName and itemBrand
When both the item name and brand are present, the data is folded using those labels to distinguish the metrics.
3. With eventName
If a column only contains a single event, the event label is dropped and only the numerical value is displayed for a cleaner feed.
4. With no descriptive labels
If none of the breakdown dimensions apply, only the raw aggregated values remain.