Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

item category is mapped incorrectly #2

Open
GKnd opened this issue Jan 27, 2021 · 2 comments
Open

item category is mapped incorrectly #2

GKnd opened this issue Jan 27, 2021 · 2 comments

Comments

@GKnd
Copy link

GKnd commented Jan 27, 2021

I found that item category is not populated in GA4 purchase when using this template.

@LucianoVandi
Copy link

This template assume that EE category it's separate by / character. This is the line of code that split the category string:

const category = i.category ? i.category.split('/') : [];

I've found many cases where the separator it's a > character. It could be easily fixed by using a regex that check for both characters.

@sahava do you think is possibile to make this change?

Thanks for your precious work!

@sahava
Copy link
Contributor

sahava commented Nov 25, 2021

Hi,

Per the Enhanced Ecommerce specification, category separator is / – that's the only way to make it populate the Category Level 1, Category Level 2, etc. dimensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants