With conversion tracking, you can measure and analyze important user actions or events, such as form submissions, purchases, or any other desired conversions.
Tracking conversions with Builder only requires adding a few lines of code to your app, as in the examples below:
When you use cross-domain conversion tracking, such as when your checkout page is on a different domain than your store, you need to associate the session on the store with the conversion on the checkout page.
Pass the sessionId
as a query param on the checkout URL as in the following example:
import { builder } from '@builder.io/react';
/**
* append the session to the URL to associate conversions
*/
const Cart = () => {
...
const checkoutUrl = useCheckoutUrl() +
`&builder.overrideSessionId=${builder.sessionId}`
...
}
Builder tracks these interactions using impression data. Ensure that this function is invoked in the same browser environment as the impressions and click events are dispatched. Since this API is designed for browser usage, it may not function as intended if used server-side.
Note that if you are a Shopify store and have installed Builder's Shopify app, the above code is not needed, as it is installed automatically.