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

Add product category name to Google Analytics for ecommerce #1859

Closed
Noodleyman opened this Issue Jan 17, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@Noodleyman

Noodleyman commented Jan 17, 2018

This makes the category name available for use in analytics, using either Google ga.js or analytics.js

looks like a simple query change in cubecart.class.php to just join CubeCart_inventory and then CubeCart_category, or just query the category index to get the cat_id then lookup the cat name to get the correct category

@abrookbanks

This comment has been minimized.

Member

abrookbanks commented Feb 19, 2018

Does it need to be an approved Google defined category or anything?

Sorry I'm being lazy. Looks like it can be any format.

screen shot 2018-02-19 at 11 18 10

@abrookbanks abrookbanks self-assigned this Feb 20, 2018

@abrookbanks abrookbanks added this to the 6.2.0 milestone Feb 20, 2018

abrookbanks added a commit that referenced this issue Feb 20, 2018

@abrookbanks

This comment has been minimized.

Member

abrookbanks commented Feb 20, 2018

screen shot 2018-02-20 at 16 06 52

@havenswift-hosting

This comment has been minimized.

havenswift-hosting commented Feb 21, 2018

Will you be going back and updating #1858 with this ?

@abrookbanks

This comment has been minimized.

Member

abrookbanks commented Feb 21, 2018

It has been on the 6.2 branch but not the 6.1.14 branch.

@havenswift-hosting

This comment has been minimized.

havenswift-hosting commented Feb 21, 2018

Would have seen that if I checked the commit but it was 01:30 !

Using $item.product_id for the category name though ?

@abrookbanks

This comment has been minimized.

Member

abrookbanks commented Feb 21, 2018

Using $item.product_id for the category name though ?

Nope. It uses the product id index to find it.

@abrookbanks abrookbanks changed the title from Add product category name to GA_ITEMS variable to Add product category name to Google Analytics for ecommerce Mar 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment