google analytics api - Can i call ecommerce:send before pageview send? -
i've read multiple forums , google documentation find (analytics, ecommerce, custom dimension) did not find reply question:
can phone call ga('ecommerce:send'); before ga('send', 'pageview'); ?
my current (simplified) ga code setup looks , i'm wondering if right (by mean ll send 2 tracings: 1st pageview nail inncluding custom dimension, , 2nd ecommerce?)
ga('create', '***', 'auto', { 'allowlinker': true }); ga('require', 'ecommerce', 'ecommerce.js'); ga('ecommerce:addtransaction', { 'id': '***', 'revenue': '***', 'currency': '***' }); ga('ecommerce:additem', { 'id': '***', 'name': '***', 'sku': '***', 'category': '***', 'price': '***', 'quantity': '1' }); ga('ecommerce:send'); ga('set', 'dimension1', '***'); ga('send', 'pageview');
yes, work standard ecommerce tracking. you'll sending 2 hits google analytics, 1 transaction (e.g. ecommerce:send) , 1 pageview.
google-analytics-api
No comments:
Post a Comment