- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-24-2019 07:00 AM - edited 10-24-2019 07:10 AM
Hi,
I would like to understand the lifetime spend for each category, i m interested in Rings vs Necklaces.
However the product category is set only on PLP and PDP pages.
So I am trying to understand how to get lifteime spend for each category given that the on confirmation page i have the product name and id but not the category.
After that being able to get the spend for Rings and Necklaces
Thanks
I will give it a go along with another solution I thought.
I will keep you posted.
10-25-2019 05:26 AM - last edited on 05-14-2020 12:45 PM by KristenMeren
@billysballo Your problem is that product_category is not present in the data layer on the order confirmation page, only product_id. Presumably, both product_id and product_category are present on the PLP and PDP pages, as well as the add to cart event?
In that case, one approach is to "remember" the most recent product_id and product_category and then use this "remembered" value when incrementing the Tally on the confirmation page event, if the product_id there matches the most recently "remembered" product_id.
You could either do this "remembering" client-side (using for example a Persist Data Value extension) or in AudienceStream (using for example a pair of visit String attributes).
Copyright All Rights Reserved © 2008-2023