Google Analytics Enhanced Ecommerce - Track Product View with 'event' rather than 'pageview' -
Is this acceptable? Calling pageview in the header, and then sending an event (pages) at the bottom of the page?
// head ga ('create', 'UA-XXXXX-Y'); GA ('Requirement', 'ECC'); Ga ('Send', 'Pageview'); // Product Description / body ga ('EC: adproduct', '' id ':' p 12345 ',' name ':' Android vorhall t-shirt ',' category ':' apparel ',' brand ':' Google ',' Version ':' black '}); GA ('EC: set action', 'expansion'); Ga ('send', 'event')
Will this be a better practice?
// head ga ('create', 'UA-XXXXX -Y'); GA ('Requirement', 'ECC'); // Product Description / body ga ('EC: adproduct', '' id ':' p 12345 ',' name ':' Android vorhall t-shirt ',' category ':' apparel ',' brand ':' Google ',' Version ':' black '}); GA ('EC: set action', 'expansion'); // somewhere near the footer ga ('send', 'pageview');
In context of syntax for event push, when you send an event GA, You must include category and action (as defined here). You will be in your event push:
ga ('send', 'event', 'eventcategory', 'eventAction');
Your ecommerce transaction looks fine.
However, the strategy to send an event with your pageview is not definite. Usually an event is linked to some action (such as button or link click).
Hope it helps.
Comments
Post a Comment