After setting up the trigger for the purchase event, you can navigate to Site Goals on your FigPii dashboard and define the goal.
Using purchase as the event value will automatically associate revenue with the goal.
track()
Using this function, you can attach trackers to elements on the page without the hassle of having to worry about querySelectorAll, adding forEach, etc.
How to use the function:
To attach the events supply the eventType — all types supported by addEventListener() are supported — for example "click"
And finally provide the desired value which later on will be used within your AB test
Calling this function will attach a click event to any element that has .foo as a class and will fire "bar" to FigPii tracking.
An example of tracking add to cart button on Shopify:
capture.event()
Using this function, you can send a custom event to FigPii. The event will immediately be transmitted to FigPii so you're responsible to handle the trigger for the event unlike track()
Example:
capture.revenue()
Using this function, you can send revenue information from customer orders to FigPii.
The amount of revenue can be a number (float) or a string but it shouldn't contain a currency sign.