Skip to content

Commit 93465eb

Browse files
committed
Updated code for cookie conset for Other thirdparty extension comptability
1 parent c9914ad commit 93465eb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

view/frontend/requirejs-config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ var config = {
3434
mixins: {
3535
'Magento_Catalog/js/catalog-add-to-cart': {
3636
'Algolia_AlgoliaSearch/insights/add-to-cart-mixin': true
37-
},
38-
'Magento_Cookie/js/notices': {
39-
'Algolia_AlgoliaSearch/insights/notices-mixin': true
4037
}
4138
}
4239
}

view/frontend/web/insights.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ define(
294294

295295
$(function ($) {
296296
if (window.algoliaConfig) {
297+
$(document).on('click', algoliaConfig.cookieConfiguration.cookieAllowButtonSelector, function (event) {
298+
event.preventDefault();
299+
algoliaInsights.track(algoliaConfig, true);
300+
});
297301
algoliaInsights.track(algoliaConfig);
298302
}
299303
});

0 commit comments

Comments
 (0)