MatteoGabriele / vue-gtag

Global Site Tag plugin for Vue (gtag.js)
https://matteo-gabriele.gitbook.io/vue-gtag/
MIT License
864 stars 64 forks source link

How to include/use ecommerce? #53

Closed DavydeVries closed 4 years ago

DavydeVries commented 4 years ago

I like to use vue-gtag in combination of the ecommerce plugin of google. Any idea how to load/include ga('require', 'ecommerce');

Events can still be the same I guess? Example ecommerce event:

ga('ecommerce:addTransaction', {
  'id': '1234',                     // Transaction ID. Required.
  'affiliation': 'Acme Clothing',   // Affiliation or store name.
  'revenue': '11.99',               // Grand Total.
  'shipping': '5',                  // Shipping.
  'tax': '1.29'                     // Tax.
});

EDIT: Nevermind after some digging I found: Purchase

MatteoGabriele commented 4 years ago

yes in gtag they have changed the library a bit and also the name itself

alvarochvz commented 4 years ago

Hi @DavydeVries did you manage to track events related to ecommerce? Here is some snippet of my setup maybe you can guide me.

I have many of this scattered over the code, I will give it some time for the data to arrive, but if you see something wrong, please let me know.

Thanks in advance!

image