-
Notifications
You must be signed in to change notification settings - Fork 18
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
Matomo tracker update #376
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not tracking orders and carts correctly...
Tracking Cart Updates in Matomo (Optional)
To track cart additions and removals, your cart system will need to send the details for every item that remains in the cart after a user adds or removes an item, including those already submitted from prior Add to Cart clicks. This is important to collect accurate information for the abandoned cart feature within Matomo. The data should be included within a “push”, which is the function that enables sending of structured data to Matomo via JavaScript. You will also need to supply the total value of all items in the cart. so the two required elements for cart tracking are:
A push of 'addEcommerceItem' for each product currently in the cart, including the name and SKU at a minimum.
A final 'trackEcommerceCartUpdate' push with the cart total passed as a parameter.
Can't see trackEcommerceCartUpdate anywhere or removeEcommerceItem or clearEcommerceCart...
This will not be very stable like this I guess...
@@ -2,28 +2,31 @@ import fetch from 'isomorphic-unfetch'; | |||
import { encode } from 'querystring'; | |||
import { subscribe } from '../director'; | |||
|
|||
const extractOrderParameters = (orderPosition) => { | |||
const parseCurrency = (amount) => parseFloat(amount / 100).toFixed(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you do a parseFloat here? Please use accounting package if you do divide and toFixed. Else we will have problems with the float handling of js (http://openexchangerates.github.io/accounting.js/)
@pozylon ok, noted. i used parseFloat to provide the correct value as int/float and not string since it's required |
@Mikearaya Can you please stale this PR for the moment and copy the Matomo Tracker Plugin to the Publicare Repository so we have everything in one place. We can re-add it back to the engine once it works as expected. |
32adff8
to
4c7e9ad
Compare
826dddb
to
b67defa
Compare
Introduced async_hooks async context through meteor 2.3 (node 14), will be the base for reading context data in a future matomo tracker version |
@pozylon nothing is being registered in the context yet right? |
currently, the Product category is not available (in publicare context) unless we use tags here after.