matomo-org / matomo-org/plugin-GoogleAnalyticsImporter
GA4 Importer doesn't import E-Commerce data - in contrast to UA
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 29
- Forks
- 16
- Avg merge
- 15h 12m
- Merged PRs (30d)
- 14
Description
Hi,
I'm just loading data of some Universal Analytics properties, including e-commerce details. Now I'm on my way to do the same with the GA4 properties. However in contract to the UA importer, the GA4 importer doesn't import so important information as e-commerce revenue, conversion rate and no products details at all. Also goal values look wrong. Except for the conversion rate, everything else was fine with the UA importer.
I also checked the GA4 Query Explorer and it looks all values are possible to fetch there.
Here is a query for **product details**:
{"dimensions":[{"name":"itemId"},{"name":"itemName"}],"metrics":[{"name":"itemRevenue"},{"name":"itemsPurchased"}],"dateRanges":[{"startDate":"2023-06-01","endDate":"2023-06-30"}]}
And the result:
{"dimensionHeaders":[{"name":"itemId"},{"name":"itemName"}],"metricHeaders":[{"name":"itemRevenue","type":"TYPE_CURRENCY"},{"name":"itemsPurchased","type":"TYPE_INTEGER"}],"rows":[{"dimensionValues":[{"value":"561020"},{"value":"NERF - Super Soaker XP100"}],"metricValues":[{"value":"499.782208"},{"value":"20"}]}],"rowCount":243,"metadata":{"schemaRestrictionResponse":{},"currencyCode":"EUR","timeZone":"Europe/Berlin"},"kind":"analyticsData#runReport"}
Query for **E-Commerce Purchases, Revenue and Session Conversion Rate**:
{"metrics":[{"name":"ecommercePurchases"},{"name":"purchaseRevenue"},{"name":"sessionConversionRate"}],"dateRanges":[{"startDate":"2023-06-01","endDate":"2023-06-30"}],"limit":"1"}
Result:
{"metricHeaders":[{"name":"sessionConversionRate","type":"TYPE_FLOAT"}],"rows":[{"metricValues":{"metricHeaders":[{"name":"ecommercePurchases","type":"TYPE_INTEGER"},{"name":"purchaseRevenue","type":"TYPE_CURRENCY"},{"name":"sessionConversionRate","type":"TYPE_FLOAT"}],"rows":[{"metricValues":[{"value":"259"},{"value":"13669.916495000001"},{"value":"0.014340291235258292"}]}],"rowCount":1,"metadata":{"schemaRestrictionResponse":{},"currencyCode":"EUR","timeZone":"Europe/Berlin"},"kind":"analyticsData#runReport"}
That should be possible to request and process, right?
It would be great to have this build into the importer soon, because as of 1st July 2024, only GA4 properties hold data and also they only keep 14 month. So time to transfer runs out.
I'm on Matomo 5.0.3 and GoogleAnalyticsImporter plugin 5.0.12.
Greetings,
Olaf
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the GA4 importer and compare the requested metrics with the fields currently imported from the GA4 API. Use the supplied Query Explorer requests as reference for product details, purchases, revenue, conversion rate, and goal values. Done means these values are requested, processed, and retained correctly, with coverage for the reported differences from UA.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- analytics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100