Google Analytics 4 (GA4) has reports for Item Lists, Promotions and Search Terms. However, revenue and Key Events are not attributed back to these dimensions out of the box. If you want this level of detail, you have to build the attribution yourself.

To solve this, I created an open-source attribution solution for Purchase (and other ecommerce) events, using Google Tag Manager:
- GTM (Web) attribution
- Attribution data is stored in cookies or Local Storage.
- Server-side GTM attribution
- Attribution data is stored in a NoSQL document database.
The original server-side version used Google Cloud Firestore as the storage layer.
Since then, server-side GTM vendors like Stape have arrived and added extra value to the server-side stack. Stape includes its own NoSQL document database called Stape Store. If you’re using Stape as your server-side GTM hosting solution, I recommend using Stape Store instead of Firestore.
At the time of writing, Stape Store is included at no extra charge on Pro and higher plans.
- Easier to set up than Firestore
- Fully capable of supporting the same attribution logic
I’ve now updated the server-side GTM solution to support Stape Store as a storage option.
What the attribution solution does
The attribution logic supports:
- Last-click attribution
- First-click attribution
- Attribution for Item Lists, Promotions and Search Terms
- Reset/delete of attribution data after Purchase
- Configurable attribution window (how long an Item List, Promotion or Search Term should keep credit)
- Attribution window based on either the GA4 session or a custom time period
The attribution solution is open source and fully documented on GitHub.
The image below shows how GA4 Item List data is stored in Stape Store.

With the recent updates to Stape Store of collections and Time To Live (TTL), now it was time to include Stape Store as an option for the attribution solution.

Be the first to comment on "Attributing GA4 Item Lists, Promotions and Search Terms via Stape Store"