Skip to main content
By default, you’ll send click and view events when users view or select search results. Event settings live on the Insights page of the app, in the Event tracking section. To turn off sending events, turn off Use click analytics and select Save. Screenshot of the 'Event tracking' settings with 'Use click analytics' enabled, UserToken options, and 'Use data layer analytics' toggles. By default, a new anonymous is generated on every page load. For more persistent user tokens, select Persistent token via cookies, based on shopper approval. Before you can use cookies to store the user token, you must turn on “Cookie consent tracking” in your BigCommerce control panel. To find this option in your BigCommerce store, go to Settings > Security & Privacy > Your customers’ privacy. Without consent, a random token is used instead. Screenshot of a settings section with a 'Cookie consent tracking' toggle enabled and a 'Privacy Policy URL' input field.

Big Open Data Layer analytics

  1. Turn on Use data layer analytics to enable Big Open Data Layer.
  2. Select the type of user interaction to track:
    • Add to cart. Send a conversion event when a shopper adds a product to their cart.
    • Order purchased. Send a conversion event when a shopper completes a purchase.
  3. Select Save.

Send conversion events from product, cart, and checkout pages

To send add-to-cart and purchase events from product pages, the cart, and checkout, add a script to your store that listens to Big Open Data Layer (BODL) events. Use the script instead of the Add to cart and Order purchased options. Before you add the script, on the Insights page of the app:
  • Turn on Use click analytics.
  • Turn on Use data layer analytics. This loads the Insights library on every page of your store. If your Autocomplete or InstantSearch code is out of date, the app asks you to upgrade it first.
  • Turn off Add to cart and Order purchased. The script sends these events, so leaving them on can send duplicate events.
To add the script:
  1. Go to the BigCommerce Script Manager and select Create a Script.
  2. Complete the script form settings:
    • Name. Enter a name for the script, such as Algolia conversion events.
    • Placement. Select Footer.
    • Location. Select All pages.
    • Script Category. Select the category that matches your store’s cookie consent setup. If cookie consent tracking is on, BigCommerce only loads scripts in non-essential categories after shoppers consent.
    • Script type. Select Script.
  3. Add this code to the Script Contents field:
    HTML
  4. Select Save.
The script sends these events: The script keeps each product’s queryID in the browser’s local storage until the shopper completes a purchase. It reads your index’s record type and sends the product ID for product-level records or the variant ID for variant-level records. To check that Algolia receives the events, see Validate your events.
Last modified on October 14, 2026