Conversion tracking
In Plasmic you can track how your pages are converting and visualize your data in the analytics panel.
This feature currently only works with the Headless API, not codegen.
Instrumenting tracking
The tracking API is available through the loader instance created with initPlasmicLoader
. Calling trackConversion()
is enough to trigger the tracking of a conversion. For example:
function MyPage() {return (<PlasmicRootProvider loader={PLASMIC}><PlasmicComponentcomponent={'MyPage'}componentProps={{buyButton: {onClick: () => {PLASMIC.trackConversion();}}}}/></PlasmicRootProvider>);}
Optionally you can pass a value in trackConversion(value)
in case you can attribute different values for each of conversion. For example, the price of an item that was bought.
For tracking to work properly, make sure that in your plasmic-init
file the correct project ids are being passed.
trackConversion
API
PLASMIC.trackConversion(value)
is called with the value that should be tracked with the conversion.
Field | Required? | Description |
---|---|---|
value | No | The value that should be attributed to the conversion to be tracked |
Have feedback on this page? Let us know on our forum.