Utilizamos cookies para mejorar su experiencia de compra. Usted podrá seleccionar las cookies nuestra y de terceros que desea utilizar en cualquier momento.
// Instantiate the tracking class
var rcAnalyticsEvents = new RcAnalyticsEvents();
// page controller
var controllerName = 'category';
var compliantModules = {"default":"order","supercheckout":"supercheckout","onepagecheckoutps":"order","sveacheckout":"sveapaypage","thecheckout":"order","steasycheckout":"default"};
var compliantModuleName = 'default';
var skipCartStep = '';
var isOrder = '';
var isCheckout = '';
var isClientId = 0;
var gaOrder;
var gaProducts;
////////////////////////////
// set tracking features
rcAnalyticsEvents.trackingFeatures = {"analyticsId":"UA-206850117-1","adwordsId":"AW-304797200","adwordsCl":"e5L_CMKU0_YCEJCsq5EB","productSendRate":10,"merchantPrefix":"","merchantSuffix":"","merchantVariant":"","businessDataPrefix":"","businessDataVariant":"","currency":"MXN","idShop":1,"productsPerPage":24,"cartAjax":1,"token":"a9b86829a7a41e60e7b65f79b9b5e76d","disableInternalTracking":false,"signUpTypes":["new customer","guest customer"],"isNewSignUp":false,"isGuest":0,"checkDoNotTrack":1,"config":{"optimizeId":"","simpleSpeedSampleRate":1,"anonymizeIp":1,"linkAttribution":1,"userIdFeature":1,"userIdValue":null,"remarketing":1,"crossDomainList":"","clientId":0,"businessData":0,"customDimensions":{"ecommProdId":3,"ecommPageType":4,"ecommTotalValue":5,"ecommCategory":6,"dynxItemId":5,"dynxItemId2":6,"dynxPageType":7,"dynxTotalValue":8}},"goals":{"signUp":1,"socialAction":1},"eventValues":{"signUp":0,"socialAction":0}};
// set checkout values
rcAnalyticsEvents.controllerName = controllerName;
rcAnalyticsEvents.isCheckout = isCheckout;
rcAnalyticsEvents.compliantModuleName = compliantModuleName;
rcAnalyticsEvents.skipCartStep = skipCartStep;
// list names
rcAnalyticsEvents.lists = {"default":"category","filter":"filtered_results"};
// Google remarketing - page type
rcAnalyticsEvents.ecommPageType = 'category';
// get products list to cache
rcAnalyticsEvents.productsListCache = {"1153-0":{"id":"1153","id_product":"1153","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN AEROSOL MAJA CON 130 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7501046109465","supplier_reference":"","ean13":"7501046109465","price_amount":59.64999999999999857891452847979962825775146484375},"1154-0":{"id":"1154","id_product":"1154","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN AEROSOL NIVEA DAMA BEAUTY TOUCH CON 150 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"4005808630660","supplier_reference":"","ean13":"4005808630660","price_amount":61.3599999999999994315658113919198513031005859375},"1155-0":{"id":"1155","id_product":"1155","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN AEROSOL NIVEA DAMA BLACK&WHITE INVISIBLE CON 150 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"4005900036643","supplier_reference":"","ean13":"4005900036643","price_amount":44.47999999999999687361196265555918216705322265625},"1156-0":{"id":"1156","id_product":"1156","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN AEROSOL NIVEA DAMA CLASSIC TOUCH CON 150 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"4005808829675","supplier_reference":"","ean13":"4005808829675","price_amount":59.7999999999999971578290569595992565155029296875},"1157-0":{"id":"1157","id_product":"1157","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN AEROSOL NIVEA DAMA EFECTO SAT\u00cdN CON 150 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"4005900081087","supplier_reference":"","ean13":"4005900081087","price_amount":53.71000000000000085265128291212022304534912109375},"1163-0":{"id":"1163","id_product":"1163","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN AEROSOL REXONA WOMAN ACTIVE EMOTION CON 150 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7791293032443","supplier_reference":"","ean13":"7791293032443","price_amount":52.46000000000000085265128291212022304534912109375},"1164-0":{"id":"1164","id_product":"1164","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN AEROSOL REXONA WOMAN POWDER DRY CON 150 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7791293032436","supplier_reference":"","ean13":"7791293032436","price_amount":58.46000000000000085265128291212022304534912109375},"1178-0":{"id":"1178","id_product":"1178","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN BARRA LADY SPEED STICK ACTIVE FRESH CON 45 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7509546015514","supplier_reference":"","ean13":"7509546015514","price_amount":44.340000000000003410605131648480892181396484375},"1179-0":{"id":"1179","id_product":"1179","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN BARRA LADY SPEED STICK DERMA + VITAMINA E CON 45 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7509546060613","supplier_reference":"","ean13":"7509546060613","price_amount":52.1700000000000017053025658242404460906982421875},"1180-0":{"id":"1180","id_product":"1180","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN BARRA LADY SPEED STICK WILD FREESIA CON 45 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7509546004471","supplier_reference":"","ean13":"7509546004471","price_amount":48.3599999999999994315658113919198513031005859375},"1186-0":{"id":"1186","id_product":"1186","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN BARRA REXONA DAMA ADVANCED CON 45 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"0000075062798","supplier_reference":"","ean13":"0000075062798","price_amount":45.06000000000000227373675443232059478759765625},"1195-0":{"id":"1195","id_product":"1195","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN CREMA REXONA CLINICAL DAMA CON 48 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"0079400052926","supplier_reference":"","ean13":"0079400052926","price_amount":80.0499999999999971578290569595992565155029296875},"1202-0":{"id":"1202","id_product":"1202","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON LADY SPEED STICK POWER FRESH CON 50 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7509546060477","supplier_reference":"","ean13":"7509546060477","price_amount":32.8599999999999994315658113919198513031005859375},"1203-0":{"id":"1203","id_product":"1203","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON MAJA CON 30 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7501046195215","supplier_reference":"","ean13":"7501046195215","price_amount":13.53999999999999914734871708787977695465087890625},"1204-0":{"id":"1204","id_product":"1204","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON MAJA CON 60 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"8410190297555","supplier_reference":"","ean13":"8410190297555","price_amount":37.840000000000003410605131648480892181396484375},"1206-0":{"id":"1206","id_product":"1206","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON MUM MYSTIC CON 60 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"0000075030100","supplier_reference":"","ean13":"0000075030100","price_amount":21.910000000000000142108547152020037174224853515625},"1207-0":{"id":"1207","id_product":"1207","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON NIVEA DAMA BEAUTY TOUCH CON 50 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"4005808630646","supplier_reference":"","ean13":"4005808630646","price_amount":35.659999999999996589394868351519107818603515625},"1208-0":{"id":"1208","id_product":"1208","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON NIVEA DAMA BLACK&WHITE INVISIBLE CON 50 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"4005900036698","supplier_reference":"","ean13":"4005900036698","price_amount":30.230000000000000426325641456060111522674560546875},"1211-0":{"id":"1211","id_product":"1211","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON OBAO DAMA FLORAL CON 65 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7501027272706","supplier_reference":"","ean13":"7501027272706","price_amount":23.550000000000000710542735760100185871124267578125},"1212-0":{"id":"1212","id_product":"1212","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON OBAO DAMA FRESCURA CON 65 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7501027278487","supplier_reference":"","ean13":"7501027278487","price_amount":22.85000000000000142108547152020037174224853515625},"1214-0":{"id":"1214","id_product":"1214","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON OBAO DAMA PIEL DELICADA CON 65 G","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"7501027250612","supplier_reference":"","ean13":"7501027250612","price_amount":25.969999999999998863131622783839702606201171875},"1220-0":{"id":"1220","id_product":"1220","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON REXONA DAMA ADVANCED CON 50 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"0000075062804","supplier_reference":"","ean13":"0000075062804","price_amount":25.370000000000000994759830064140260219573974609375},"1222-0":{"id":"1222","id_product":"1222","id_category_default":"171","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON REXONA DAMA POWDER DRY CON 50 ML","category":"Desodorantes_y_antitranspirantes_para_mujer","category_name":"Desodorantes y antitranspirantes para mujer","reference":"0000078924338","supplier_reference":"","ean13":"0000078924338","price_amount":27.010000000000001563194018672220408916473388671875},"10098-0":{"id":"10098","id_product":"10098","id_category_default":"2","id_manufacturer":"0","id_product_attribute":"0","cache_default_attribute":"0","name":"DESODORANTE EN ROLL ON MUM FLORAL 60 ML","category":"inicio","category_name":"Inicio","reference":"0000075030131","supplier_reference":"","ean13":"0000075030131","price_amount":23.780000000000001136868377216160297393798828125}};
// Listing products
/////////////////////////////////
// init gtag
rcAnalyticsEvents.sendGtagConfig('analyticsId');
rcAnalyticsEvents.sendGtagConfig('adwordsId');
///////////////////////////////////////////////
// Initialize all user events when DOM ready
document.addEventListener('DOMContentLoaded', initTrackingEvents, false);
window.addEventListener('pageshow', fireEventsOnPageShow, false);
///////////////////////////////////////////////
function initTrackingEvents() {
// Events binded on all pages
// Events binded to document.body to avoid firefox fire events on right/central click
document.body.addEventListener('click', rcAnalyticsEvents.eventClickPromotionItem, false);
// bind prestashop events with tracking events
prestashop.on(
'updateCart',
function (event) {
rcAnalyticsEvents.eventAddCartProduct(event);
}
);
prestashop.on(
'clickQuickView',
function (event) {
rcAnalyticsEvents.eventProductView(event)
}
);
prestashop.on(
'updatedProduct',
function (event) {
rcAnalyticsEvents.eventProductView(event)
}
);
if (!isCheckout && !isOrder) {
// init first scroll action for those products all ready visible on screen
rcAnalyticsEvents.eventScrollList();
// bind event to scroll
window.addEventListener('scroll', rcAnalyticsEvents.eventScrollList, false);
// init Event Listeners
document.body.addEventListener('click', rcAnalyticsEvents.eventClickProductList, false);
document.body.addEventListener('click', rcAnalyticsEvents.eventGetAddCartQuantity, false);
if (rcAnalyticsEvents.trackingFeatures.goals.socialAction) {
document.body.addEventListener('click', rcAnalyticsEvents.eventSocialShareProductView, false);
}
////////////////////////
// SEARCH PAGE
if (controllerName === 'search') {
rcAnalyticsEvents.onSearchResults();
}
////////////////////////
// PRODUCT PAGE
if (controllerName === 'product') {
// send product detail view
rcAnalyticsEvents.eventProductView();
}
}
////////////////////////
// CHECKOUT PROCESS
if (isCheckout) {
// SUMMARY CART
if (controllerName === 'cart') {
// events on summary Cart
document.body.addEventListener('click', rcAnalyticsEvents.eventCartQuantityDelete, false);
document.body.addEventListener('click', rcAnalyticsEvents.eventCartQuantityUp, false);
document.body.addEventListener('click', rcAnalyticsEvents.eventCartQuantityDown, false);
}
////////////////////////
// CHECKOUT
if (compliantModuleName === 'default' && controllerName === 'order') {
// Events on Checkout Process
document.body.addEventListener('click', rcAnalyticsEvents.eventPrestashopCheckout, false);
} else if (
compliantModuleName === 'supercheckout'
&& controllerName === compliantModules[compliantModuleName]
) {
// Compatible with super-checkout by Knowband
document.body.addEventListener('click', rcAnalyticsEvents.eventOpcSuperCheckout, false);
document.body.addEventListener('click', rcAnalyticsEvents.eventCartOpcSuperCheckout, false);
} else if (
compliantModuleName === 'onepagecheckoutps'
&& controllerName === compliantModules[compliantModuleName]
) {
// compatible with OPC by PrestaTeamShop
document.body.addEventListener('click', rcAnalyticsEvents.eventOpcPrestaTeam, false);
document.body.addEventListener('click', rcAnalyticsEvents.eventCartOpcPrestaTeam, false);
} else if (
compliantModuleName === 'thecheckout'
&& controllerName === compliantModules[compliantModuleName]
) {
// Compatible with thecheckout by Zelarg
document.body.addEventListener('click', rcAnalyticsEvents.eventOpcTheCheckout, false);
document.body.addEventListener('click', rcAnalyticsEvents.eventCartOpcTheCheckout, false);
} else if (
compliantModuleName === 'steasycheckout'
&& controllerName === compliantModules[compliantModuleName]
) {
// Events for steasycheckout
document.body.addEventListener('click', rcAnalyticsEvents.eventOpcStEasyCheckout, false);
document.body.addEventListener('click', rcAnalyticsEvents.eventCartOpcStEasyCheckout, false);
}
}
}
function fireEventsOnPageShow(event){
// fixes safari back cache button
if (event.persisted) {
window.location.reload()
}
// Sign up feature
if (rcAnalyticsEvents.trackingFeatures.goals.signUp && rcAnalyticsEvents.trackingFeatures.isNewSignUp) {
rcAnalyticsEvents.onSignUp();
}
if (isClientId) {
rcAnalyticsEvents.setClientId();
}
// Checkout and order complete
if (isCheckout && gaProducts) {
rcAnalyticsEvents.onCheckoutProducts(gaProducts);
} else if (isOrder && gaOrder && gaProducts) {
rcAnalyticsEvents.onAddOrder(gaOrder, gaProducts, rcAnalyticsEvents.trackingFeatures.idShop);
}
}