Enable click analytics
Set Enable Click Analytics to Yes to turn on click and conversion analytics.
clickAnalytics=true
to every search.
The default for this setting is No.
DOM selector of a result container on InstantSearch page
Enter a DOM selector for the search results container to define which elements on your page are tracked. The elements selected must have thedata-objectid
and data-position
attributes.
This default DOM selector is .ais-Hits-item a.result, .ais-InfiniteHits-item a.result
.
Enable conversion tracking
To determine how well Algolia helps achieve your business objectives, enable conversion tracking. Previous versions of the extension required you to specify which event you would like to track as a conversion, either Add to cart or Place order. From version3.14
Algolia tracks both types of conversions.
To do this, set Enable Click Analytics to Yes:

Conversion types | Description |
---|---|
Add to cart | A conversion event is triggered as soon as a user clicks the Add to cart button. This can either be on the search results or the product page. |
Place order | A conversion event is triggered when a user lands on the Checkout Successful page. |
To be considered a conversion,
a user must have interacted with your search at least once during the session for the product being considered.
queryID
, objectID
, and indexName
parameters.
You need to include these parameters for your clicks and conversions to work.
For better SEO, you should use canonical link meta tags for your product pages.
To enable canonical links, go to Stores > Configuration > Catalog > Catalog and set Use Canonical Link Meta Tag For Products to Yes.
If youβre using an alternative method to track the queryID
, objectID
, and indexName
parameters for your conversion events,
you can remove the URL parameters by editing the
common.js
file.
URL parameters added to product links
From version 2 and later, URL parameters are appended to the product links in your search if you enable conversion tracking. This is so search can be tied to a conversion event using thequeryID
parameter.
As best SEO practice, use canonical links for your product pages.
Enable this setting by going to Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Use Canonical Link Meta Tag For Products in your storeβs Admin
Revenue analytics
This feature isnβt available on every plan.
Refer to your pricing plan to see if itβs included.
Add to cart | Place order | |
---|---|---|
Special price | ||
Catalog price rule | ||
Cart price rule | ||
Customer group pricing |
Version 3.14 uses version 4 of the Algolia PHP API client to support this feature.
Version 4 of the client requires PHP 8.
Plan for this upgrade accordingly before pushing to production.
DOM selector of Add to cart buttons
Enter a selector for the Add to cart button if the conversion analytics mode is set to Add to cart. The elements targeted by this selector must have thedata-objectid
attribute (unique product identifier).
The default is .action.primary.tocart
.