Before I explain the issue i am facing, I must say I am a relative newbie and I am still learning the ropes here.
However I am unable to understand how to set up the tracker to send events like Ecommerce transactions (for which there are predefined fields tr and ti).
Taking ecommerce transaction as an example: There are 3 main steps as far as I understand: 1) Create a transaction object (
addTrans) 2) Add items to the transaction (
addItem) 3) Submit the transaction to Snowplow (
What i cannot understand is how would the
addTrans method be called with the parameters based on actual data (total, tax, orderId etc.) Does this involve firing additional methods from the html code of the website based on events like check out success?
The example given is:
snowplow('addTrans', '1234', // order ID - required 'Acme Clothing', // affiliation or store name '11.99', // total - required '1.29', // tax '5', // shipping 'San Jose', // city 'California', // state or province 'USA', // country 'USD' // currency );
And the total and orderId fields are required.
I hope i am able to present my case (and my noob-ness in this field) clearly