Click & Conversion Analytics
To analyse how customers are behaving in your Magento installation, it’s possible to make use of the built-in Click & Conversion Analytics. In both the autocomplete search and instant search page, it’s possible to track which products are clicked more often, and which queries lead to the highest conversion rate.
This feature is not available on all plans, please refer to the pricing page for more details.
Configuration
The analytics has four settings to configure the conversion analytics.
Enable Click Analytics
This setting determines if the feature is enabled or not. Enabling this feature will only work if your plan has the analytics feature available.
This setting defaults to ‘No’.
DOM selector of a result container on instant search page
This DOM selector is used to determine which elements on your page should be tracked.
Please note that the elements selected by this selector must have the data-objectid
and data-position
attributes.
This setting defaults to .ais-Hits-item a.result, .ais-InfiniteHits-item a.result
.
Conversion Analytics Mode
This setting determines which event should be considered a conversion.
It has a few possible values: Disabled
, Add to cart
and Place Order
.
In order to be considered a conversion, the user must have interacted with your search at least once during the session for the product being converted.
From version 2 and up, the extension appends URL parameters to the product links in your search if you enable conversion tracking. It does this so it can tie the search to a conversion event using the queryID
, objectID
and indexName
parameters. You need to include these parameters for your clicks and conversions to work. For best SEO practice, it’s recommended to use canonical links for your product pages. You can enable this setting in Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Use Canonical Link Meta Tag For Products. If you want to remove these parameters from your URLs, you can use a custom alternative method to track these parameters in your clicks and conversions. You can then remove the code that builds the URL structure from the common.js
file.
Disabled
This is the default value, and will disable the tracking of conversions.
Add to cart
This conversion event will be triggered as soon as a user presses the ‘Add to Cart’ button. This can either be on the search results page, or on the product page.
Place Order
This conversion event will be triggered when a user lands on the Checkout Successful page.
DOM selector of Add to Cart button
This setting determines which selector to use when selecting the button that to be tracked when the Conversion Analytics Mode is set to ‘Add to Cart’.
Please note that the elements selected by this selector must have the data-objectid
(unique product identifier) attribute.
This setting defaults to .action.primary.tocart
.