open-dollar / od-app

https://app.dev.opendollar.com
6 stars 4 forks source link

Matomo e-commerce integration #593

Closed jahabeebs closed 2 months ago

jahabeebs commented 2 months ago

docs: https://matomo.org/faq/reports/advanced-manually-tracking-ecommerce-actions-in-matomo/

// Add ecommerce item

_paq.push(['addEcommerceItem', "01234567890", // (required) SKU: Product unique identifier - can be collateral type "Ecommerce Analytics Book", // (optional) Product name - "Deposit collateral_name" "Books", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["Books", "New releases", "Biography"] - Vault 9.99, // (Recommended) Product Price - in USD 1 // (Optional - Defaults to 1) ]);

// View ecommerce item - create general item for views

// Order updates -- track ecommerce order

// Order Array - Parameters should be generated dynamically _paq.push(['trackEcommerceOrder', "000123", // (Required) orderId - total supply of vaults + 1 or vault ID based on tx receipt 10.99, // (Required) grandTotal (revenue) 9.99, // (Optional) subTotal 1.5, // (optional) tax 1, // (optional) shipping false // (optional) discount ]);

pi0neerpat commented 2 months ago

Lets just add trackEcommerceOrder