{"webLayers":[{"_id":"68b56a3e8d7579dd5ca3f38c","date_filter":{"enabled":false,"from_date":null,"to_date":null},"trigger":{"include_pages":[{"url":"charlies","type":"contains"}],"exclude_pages":[{"url":"cart","type":"contains"},{"url":"checkout","type":"contains"},{"url":"https://www.charlies.co.uk/store-locations/cheltenham/","type":"exact"}]},"device_target":{"type":"any"},"frequency":"only_once","uses_personalization":true,"data":"","variables_target":null,"page_vars":[]},{"_id":"68d2b66d068421910f4edcad","date_filter":{"enabled":false,"from_date":null,"to_date":null},"trigger":{"include_pages":[{"url":"https://www.charlies.co.uk/store-locations/cheltenham/","type":"exact"}],"exclude_pages":[{"url":"cart","type":"contains"},{"url":"checkout","type":"contains"}]},"device_target":{"type":"any"},"frequency":"until_visitor_interacts","uses_personalization":true,"data":"","variables_target":null,"page_vars":[]}],"experiments":[],"constantManagedTags":[{"uses_overlay":false,"type":"js","parametrized_definition":"(function() {\n    /*\n     jQuery v1.9.1 (c) 2005, 2012\n     jQuery Foundation, Inc. jquery.org/license.\n    */\n    var g = /\\[object (Boolean|Number|String|Function|Array|Date|RegExp)\\]/;\n\n    function h(a) {\n        return null == a ? String(a) : (a = g.exec(Object.prototype.toString.call(Object(a)))) ? a[1].toLowerCase() : \"object\"\n    }\n\n    function k(a, b) {\n        return Object.prototype.hasOwnProperty.call(Object(a), b)\n    }\n\n    function m(a) {\n        if (!a || \"object\" != h(a) || a.nodeType || a == a.window) return !1;\n        try {\n            if (a.constructor \u0026\u0026 !k(a, \"constructor\") \u0026\u0026 !k(a.constructor.prototype, \"isPrototypeOf\")) return !1\n        } catch (b) {\n            return !1\n        }\n        for (var c in a);\n        return void 0 === c || k(a, c)\n    };\n    /*\n     Copyright 2012 Google Inc. All rights reserved. */\n    function n(a, b, c) {\n        this.b = a;\n        this.f = b || function() {};\n        this.d = !1;\n        this.a = {};\n        this.c = [];\n        this.e = p(this);\n        r(this, a, !c);\n        var d = a.push,\n            e = this;\n        a.push = function() {\n            var b = [].slice.call(arguments, 0),\n                c = d.apply(a, b);\n            r(e, b);\n            return c\n        }\n    }\n    window.DataLayerHelper = n;\n    n.prototype.get = function(a) {\n        var b = this.a;\n        a = a.split(\".\");\n        for (var c = 0; c \u003c a.length; c++) {\n            if (void 0 === b[a[c]]) return;\n            b = b[a[c]]\n        }\n        return b\n    };\n    n.prototype.flatten = function() {\n        this.b.splice(0, this.b.length);\n        this.b[0] = {};\n        s(this.a, this.b[0])\n    };\n\n    function r(a, b, c) {\n        for (a.c.push.apply(a.c, b); !1 === a.d \u0026\u0026 0 \u003c a.c.length;) {\n            b = a.c.shift();\n            if (\"array\" == h(b)) a: {\n                var d = b,\n                    e = a.a;\n                if (\"string\" == h(d[0])) {\n                    for (var f = d[0].split(\".\"), u = f.pop(), d = d.slice(1), l = 0; l \u003c f.length; l++) {\n                        if (void 0 === e[f[l]]) break a;\n                        e = e[f[l]]\n                    }\n                    try {\n                        e[u].apply(e, d)\n                    } catch (v) {}\n                }\n            }\n            else if (\"function\" == typeof b) try {\n                    b.call(a.e)\n                } catch (w) {} else if (m(b))\n                    for (var q in b) s(t(q, b[q]), a.a);\n                else continue;\n            c || (a.d = !0, a.f(a.a, b), a.d = !1)\n        }\n    }\n\n    function p(a) {\n        return {\n            set: function(b, c) {\n                s(t(b, c), a.a)\n            },\n            get: function(b) {\n                return a.get(b)\n            }\n        }\n    }\n\n    function t(a, b) {\n        for (var c = {}, d = c, e = a.split(\".\"), f = 0; f \u003c e.length - 1; f++) d = d[e[f]] = {};\n        d[e[e.length - 1]] = b;\n        return c\n    }\n\n    function s(a, b) {\n        for (var c in a)\n            if (k(a, c)) {\n                var d = a[c];\n                \"array\" == h(d) ? (\"array\" == h(b[c]) || (b[c] = []), s(d, b[c])) : m(d) ? (m(b[c]) || (b[c] = {}), s(d, b[c])) : b[c] = d\n            }\n    };\n})();\n\n// Start of Johan @ Datacop enhancements\n/**\n * Get attribute from BCData global variable with graceful fallbacks\n * @param {string} attribute - The attribute path (e.g., 'sku', 'price.with_tax.value', 'weight.formatted')\n * @param {*} defaultValue - Default value to return if attribute not found\n * @returns {*} The attribute value or default value\n */\nfunction getBCDataAttribute(attribute, defaultValue = null) {\n    try {\n        // Check if BCData exists\n        if (typeof window.BCData === 'undefined' || !window.BCData) {\n            console.warn('BCData global variable not found');\n            return defaultValue;\n        }\n        \n        // Check if product_attributes exists\n        if (!window.BCData.product_attributes) {\n            console.warn('BCData.product_attributes not found');\n            return defaultValue;\n        }\n        \n        const productAttrs = window.BCData.product_attributes;\n        \n        // Handle simple attribute names (no dot notation)\n        if (!attribute.includes('.')) {\n            const value = productAttrs[attribute];\n            return value !== undefined ? value : defaultValue;\n        }\n        \n        // Handle nested attributes with dot notation\n        const path = attribute.split('.');\n        let current = productAttrs;\n        \n        for (let i = 0; i \u003c path.length; i++) {\n            if (current === null || current === undefined || typeof current !== 'object') {\n                console.warn(`BCData path broken at: ${path.slice(0, i + 1).join('.')}`);\n                return defaultValue;\n            }\n            \n            current = current[path[i]];\n            \n            if (current === undefined) {\n                console.warn(`BCData attribute not found: ${attribute}`);\n                return defaultValue;\n            }\n        }\n        \n        return current;\n        \n    } catch (error) {\n        console.error('Error getting BCData attribute:', error);\n        return defaultValue;\n    }\n}\n\n/**\n * Predefined getters for common attributes\n */\nconst BCDataGetters = {\n    // Basic product info\n    getSku: () =\u003e getBCDataAttribute('sku'),\n    getUpc: () =\u003e getBCDataAttribute('upc'),\n    getMpn: () =\u003e getBCDataAttribute('mpn'),\n    getGtin: () =\u003e getBCDataAttribute('gtin'),\n    \n    // Price info\n    getPrice: () =\u003e getBCDataAttribute('price.with_tax.value'),\n    getPriceFormatted: () =\u003e getBCDataAttribute('price.with_tax.formatted'),\n    getCurrency: () =\u003e getBCDataAttribute('price.with_tax.currency', 'GBP'),\n    getTaxLabel: () =\u003e getBCDataAttribute('price.tax_label'),\n    \n    // Sale price info\n    getSalePrice: () =\u003e getBCDataAttribute('price.sale_price_with_tax.value'),\n    getSalePriceFormatted: () =\u003e getBCDataAttribute('price.sale_price_with_tax.formatted'),\n    getNonSalePrice: () =\u003e getBCDataAttribute('price.non_sale_price_with_tax.value'),\n    getNonSalePriceFormatted: () =\u003e getBCDataAttribute('price.non_sale_price_with_tax.formatted'),\n    getRrpPrice: () =\u003e getBCDataAttribute('price.rrp_with_tax.value'),\n    getRrpPriceFormatted: () =\u003e getBCDataAttribute('price.rrp_with_tax.formatted'),\n    getSavedAmount: () =\u003e getBCDataAttribute('price.saved.value'),\n    getSavedAmountFormatted: () =\u003e getBCDataAttribute('price.saved.formatted'),\n    \n    // Price helpers\n    isOnSale: () =\u003e {\n        const salePrice = getBCDataAttribute('price.sale_price_with_tax.value');\n        return salePrice !== null \u0026\u0026 salePrice !== undefined;\n    },\n    getCurrentPrice: () =\u003e {\n        // Returns sale price if available, otherwise regular price\n        return getBCDataAttribute('price.sale_price_with_tax.value') || \n               getBCDataAttribute('price.with_tax.value');\n    },\n    getCurrentPriceFormatted: () =\u003e {\n        // Returns formatted sale price if available, otherwise regular formatted price\n        return getBCDataAttribute('price.sale_price_with_tax.formatted') || \n               getBCDataAttribute('price.with_tax.formatted');\n    },\n    \n    // Stock info\n    getStock: () =\u003e getBCDataAttribute('stock', 0),\n    isInStock: () =\u003e getBCDataAttribute('instock', false),\n    isPurchasable: () =\u003e getBCDataAttribute('purchasable', false),\n    getStockMessage: () =\u003e getBCDataAttribute('stock_message'),\n    getOutOfStockMessage: () =\u003e getBCDataAttribute('out_of_stock_message'),\n    \n    // Weight info\n    getWeight: () =\u003e getBCDataAttribute('weight.value'),\n    getWeightFormatted: () =\u003e getBCDataAttribute('weight.formatted')\n};\n\n// The bigcommerce variant catalog uses a variant ID as item_id which is in neither the BC dataLayer event not the exponea namespaced event. \n// We can grab it from the global var called products, or if need be from the DOM\nfunction getEntityIdQuick() {\n    try {\n        // First try the global product variable (check both patterns)\n\t\tconst productGlobal = window.product || (typeof product !== 'undefined' ? product : null);\n\t\tif (productGlobal \u0026\u0026 productGlobal.subProductId) {\n\t\t    return productGlobal.subProductId;\n\t\t}\n        \n        // Fallback to DOM selector method\n        const container = document.getElementById('local-product-inventory-container');\n        if (!container) {\n            console.warn('Neither product global var nor DOM container found for entityId in Bloomreach Tag Manager \u003e dataLayer helper');\n            return null;\n        }\n        \n        const payload = container.getAttribute('data-product-variants-payload');\n        const decoded = payload.replace(/\u0026quot;/g, '\"');\n        const parsed = JSON.parse(decoded);\n        return parsed[0]?.node?.entityId;\n        \n    } catch (e) {\n        console.error('Error in Bloomreach Tag Manager \u003e dataLayer helper getting entityId:', e);\n        return null;\n    }\n}\n\n/**\n * Parse variants data and create SKU-to-EntityID lookup cache\n * @returns {Object|null} Lookup object or null if parsing fails\n */\nfunction buildVariantsLookup() {\n    try {\n        const container = document.getElementById('local-product-inventory-container');\n        if (!container) {\n            console.warn('Product inventory container not found for variants lookup');\n            return null;\n        }\n        \n        const payload = container.getAttribute('data-product-variants-payload');\n        if (!payload) {\n            console.warn('Product variants payload not found');\n            return null;\n        }\n        \n        // Decode HTML entities\n        const decoded = payload.replace(/\u0026quot;/g, '\"').replace(/\u0026#x3D;/g, '=');\n        const variants = JSON.parse(decoded);\n        \n        // Build lookup objects\n        const skuToEntityId = {};\n        const entityIdToDetails = {};\n        \n        variants.forEach(variant =\u003e {\n            const node = variant.node;\n            const sku = node.sku;\n            const entityId = node.entityId;\n            \n            // SKU to Entity ID mapping\n            skuToEntityId[sku] = entityId;\n            \n            // Entity ID to full details mapping\n            entityIdToDetails[entityId] = {\n                sku: sku,\n                entityId: entityId,\n                price: node.prices.price.value,\n                currency: node.prices.price.currencyCode,\n                isPurchasable: node.isPurchasable,\n                // Extract options (like size)\n                options: node.options.edges.map(edge =\u003e ({\n                    displayName: edge.node.displayName,\n                    value: edge.node.values.edges[0]?.node?.label || null,\n                    entityId: edge.node.values.edges[0]?.node?.entityId || null\n                })),\n                // Calculate total stock\n                totalStock: node.inventory.byLocation.edges\n                    .reduce((total, location) =\u003e total + location.node.availableToSell, 0),\n                // Stock by location\n                locationStock: node.inventory.byLocation.edges.map(location =\u003e ({\n                    code: location.node.locationEntityCode,\n                    locationId: location.node.locationEntityId,\n                    stock: location.node.availableToSell,\n                    inStock: location.node.isInStock\n                }))\n            };\n        });\n        \n        console.log('Built variants lookup cache:', {\n            totalVariants: variants.length,\n            skuKeys: Object.keys(skuToEntityId),\n            entityIdKeys: Object.keys(entityIdToDetails)\n        });\n        \n        return {\n            skuToEntityId,\n            entityIdToDetails,\n            rawVariants: variants\n        };\n        \n    } catch (error) {\n        console.error('Error building variants lookup:', error);\n        return null;\n    }\n}\n\n// Cache the lookup data (build once, use multiple times)\nlet variantsLookupCache = null;\n\n/**\n * Get cached variants lookup, building it if necessary\n * @returns {Object|null} Cached lookup object\n */\nfunction getVariantsLookup() {\n    if (!variantsLookupCache) {\n        variantsLookupCache = buildVariantsLookup();\n    }\n    return variantsLookupCache;\n}\n\n/**\n * Get entity ID from SKU for add-to-cart events\n * @param {string} sku - The variant SKU from cart event\n * @returns {number|null} Corresponding entity ID\n */\nfunction getEntityIdForCart(sku) {\n    const lookup = getVariantsLookup();\n    if (!lookup) return null;\n    \n    const entityId = lookup.skuToEntityId[sku];\n    if (entityId) {\n        console.log(`Cart lookup: SKU ${sku} → Entity ID ${entityId}`);\n        return entityId;\n    } else {\n        console.warn(`No entity ID found for cart SKU: ${sku}`);\n        return null;\n    }\n}\n\n/**\n * Get full variant details for cart events\n * @param {string} sku - The variant SKU from cart event\n * @returns {Object|null} Full variant details\n */\nfunction getVariantDetailsForCart(sku) {\n    const lookup = getVariantsLookup();\n    if (!lookup) return null;\n    \n    const entityId = lookup.skuToEntityId[sku];\n    if (entityId) {\n        const details = lookup.entityIdToDetails[entityId];\n        console.log(`Cart details for SKU ${sku}:`, details);\n        return details;\n    }\n    \n    return null;\n}\n\n/**\n * Reusable function to enrich event properties with BC data\n * @param {Object} eventProperties - Event properties object to enrich\n * @param {string} sku - Optional SKU for variant lookup\n */\nfunction enrichWithBCData(eventProperties, sku = null, entityId = null) {\n    // Get entity ID - use passed entityId or do lookup\n    if (!entityId) {\n        if (sku) {\n            entityId = getEntityIdForCart(sku);\n        } else {\n            entityId = getEntityIdQuick();\n        }\n    }\n    \n    if (entityId) {\n        eventProperties.bc_entity_id = entityId;\n    }\n    \n    // Add BCData attributes (reuse existing getters)\n    const bc_productSku = BCDataGetters.getSku();\n    if (bc_productSku) {\n        eventProperties.sku = bc_productSku;\n    }\n    \n    const bc_productUpc = BCDataGetters.getUpc();\n    if (bc_productUpc) {\n        eventProperties.upc = bc_productUpc;\n    }\n    \n    const bc_productMpn = BCDataGetters.getMpn();\n    if (bc_productMpn) {\n        eventProperties.mpn = bc_productMpn;\n    }\n    \n    const bc_productGtin = BCDataGetters.getGtin();\n    if (bc_productGtin) {\n        eventProperties.gtin = bc_productGtin;\n    }\n    \n    const bc_productPrice = BCDataGetters.getCurrentPrice(); // Use smart price getter\n    if (bc_productPrice) {\n        eventProperties.price_incl_vat = parseFloat(parseFloat(bc_productPrice).toFixed(2));\n    }\n    \n    const bc_productCurrency = BCDataGetters.getCurrency();\n    if (bc_productCurrency) {\n        eventProperties.currency = bc_productCurrency;\n    }\n    \n    const bc_productStock = BCDataGetters.getStock();\n    if (bc_productStock !== null \u0026\u0026 bc_productStock !== undefined) {\n\t    eventProperties.stock = bc_productStock;\n\t} else if (!sku) {\n\t    // For view_item events, calculate total stock across all variants as fallback\n\t    const lookup = getVariantsLookup();\n\t    if (lookup \u0026\u0026 lookup.entityIdToDetails) {\n\t        let totalStock = 0;\n\t        Object.values(lookup.entityIdToDetails).forEach(variant =\u003e {\n\t            totalStock += variant.totalStock || 0;\n\t        });\n\t        eventProperties.stock = totalStock;\n\t    }\n\t}\n    \n    const bc_productIsInStock = BCDataGetters.isInStock();\n    if (bc_productIsInStock !== null \u0026\u0026 bc_productIsInStock !== undefined) {\n        eventProperties.is_in_stock = bc_productIsInStock;\n    }\n    \n    const bc_productIsPurchasable = BCDataGetters.isPurchasable();\n    if (bc_productIsPurchasable !== null \u0026\u0026 bc_productIsPurchasable !== undefined) {\n        eventProperties.is_purchasable = bc_productIsPurchasable;\n    }\n    \n    // Add sale price info\n    if (BCDataGetters.isOnSale()) {\n        const originalPrice = BCDataGetters.getNonSalePrice();\n        const savedAmount = BCDataGetters.getSavedAmount();\n        \n        if (originalPrice) eventProperties.original_price = parseFloat(parseFloat(originalPrice).toFixed(2));\n        if (savedAmount) eventProperties.discount_amount = parseFloat(parseFloat(savedAmount).toFixed(2));\n        eventProperties.is_on_sale = true;\n    } else {\n        eventProperties.is_on_sale = false;\n    }\n    \n    // For cart events with SKU, add variant-specific details\n    if (sku) {\n        const variantDetails = getVariantDetailsForCart(sku);\n        if (variantDetails) {\n            // Override with variant-specific data\n            eventProperties.bc_variant_price = parseFloat(parseFloat(variantDetails.price).toFixed(2));\n            eventProperties.bc_variant_currency = variantDetails.currency;\n            eventProperties.bc_variant_stock = variantDetails.totalStock;\n            eventProperties.bc_variant_purchasable = variantDetails.isPurchasable;\n            \n            // Add variant options (like size)\n            variantDetails.options.forEach(option =\u003e {\n                if (option.value) {\n                    eventProperties[`bc_${option.displayName.toLowerCase()}`] = option.value;\n                }\n            });\n            \n            // Create variant_title by concatenating displayName and value\n\t        if (variantDetails.options.length \u003e 0) {\n\t            const variantTitles = variantDetails.options\n\t                .filter(option =\u003e option.value) // Only include options with values\n\t                .map(option =\u003e `${option.displayName}: ${option.value}`);\n\t            \n\t            eventProperties.variant_title = variantTitles.join(', '); // Join multiple options with comma\n\t        }\n        }\n        \n        // Add main product info from global vars\n\t\tconst productGlobal = window.product || (typeof product !== 'undefined' ? product : null);\n\t\tif (productGlobal \u0026\u0026 productGlobal.sku) {\n\t\t    eventProperties.bc_main_product_sku = productGlobal.sku;\n\t\t    eventProperties.bc_product_name = productGlobal.name;\n\t\t}\n    }\n}\n\n// End of Johan @ Datacop enhancements\n\nfunction process(model, m) {\n\t//console.log('Process function called with:', m.event, m.namespace);\n\tif (m.namespace == \"exponea\") {\n\t\t/*\n\t\t*\tMODIFY EVENT PROPERTIES\n\t\t*/\n\t\t\n\t\t switch(m.event_name){\n\t\t \tcase \"view_item\":\n\t\t \t\t// Enrich with BC data\n                enrichWithBCData(m.event_properties);\n                \n                // Ensure item_id is present - use product_id if item_id is missing\n\t\t\t    if (!m.event_properties.item_id \u0026\u0026 m.event_properties.product_id) {\n\t\t\t        m.event_properties.item_id = m.event_properties.product_id;\n\t\t\t    }\n                break;\n\t\t \tdefault:\n\t\t \t\tbreak;\n\t\t }\n\t\tif(m.event_name === \"identification\") {\n            exponea.identify(m.event_properties.customer_ids);\n        } else {\n            exponea.track(m.event_name, m.event_properties);\n        }\n\t} else if (m.namespace == \"datacop\") {\n\t\tswitch(m.event_name){\n\t\t \tcase \"variant_selected\":\n\t\t \t\tconst variantIsInStock = m.event_properties.is_in_stock || false;\n\t\t \t\t// Enrich with BC data\n                enrichWithBCData(m.event_properties);\n                \n                // Ensure item_id is present - use product_id if item_id is missing\n\t\t\t    if (!m.event_properties.item_id \u0026\u0026 m.event_properties.product_id) {\n\t\t\t        m.event_properties.item_id = m.event_properties.product_id;\n\t\t\t    }\n\t\t\t    // Ensure we use the stock status of the variant, not from BC data\n\t\t\t    if (m.event_properties.is_in_stock !== variantIsInStock) {\n\t\t\t        m.event_properties.is_in_stock = variantIsInStock;\n\t\t\t    }\n\t\t\t    // Reset stock for this variant\n\t\t\t    if (!m.event_properties.is_in_stock) {\n\t\t\t    \tm.event_properties.stock = 0;\n\t\t\t    \tm.event_properties.is_purchasable = false;\n\t\t\t    } else {\n\t\t\t    \tdelete m.event_properties.stock;\n\t\t\t    }\n\t\t\t    // Get product global\n            \tconst productGlobal = window.product || (typeof product !== 'undefined' ? product : null);\n            \tif (productGlobal.hasOwnProperty('name') \u0026\u0026 typeof productGlobal.name === \"string\") {\n            \t\tm.event_properties.title = productGlobal.name.trim();\n            \t}\n\t\t\t    // Rename event name\n\t\t\t    m.event_name = \"view_item_variant\";\n                break;\n\t\t \tdefault:\n\t\t \t\tbreak;\n\t\t }\n\t\t //exponea.track(m.event_name, m.event_properties);\n\t\t console.log('Processing Datacop view_item_variant event:', m.event_properties);\n\t} else {\n        // Handle non-Exponea events (like BigCommerce add_to_cart)\n        // The integration only sends cart_update: update, not the add with full details we need\n        // This doesn't exist in the exponea namespace, so we piggyback on the BigCommerce dataLayer event add_to_cart\n        if (m.event === \"add_to_cart\" \u0026\u0026 m.ecommerce \u0026\u0026 m.ecommerce.items) {\n        \t//console.log('Processing BigCommerce add_to_cart event');\n            // Extract SKU from BigCommerce cart event\n            const cartItem = m.ecommerce.items[0]; // Assuming single item added to cart at once\n            const cartSku = cartItem.item_sku || cartItem.item_id; // Both contain the variant SKU\n            \n            // Get the entity ID from SKU lookup\n    \t\tconst entityId = getEntityIdForCart(cartSku);\n            \n            // Get product global\n            const productGlobal = window.product || (typeof product !== 'undefined' ? product : null);\n            \n            // Create enriched Exponea cart_update event\n            const exponea_event_properties = {\n                // Exponea cart_update format\n                action: \"add\",\n                item_id: entityId || cartSku, // Use entityId if found, fallback to SKU\n                \n                // Product details\n                product_id: (productGlobal \u0026\u0026 productGlobal.sku) ? productGlobal.sku : null, // Parent product ID\n                sku: cartSku, // Variant SKU\n                title: cartItem.item_name,\n                brand: cartItem.item_brand,\n                price_incl_vat: parseFloat(parseFloat(cartItem.price).toFixed(2)),\n                currency: BCDataGetters.getCurrency(),\n                quantity: parseInt(cartItem.quantity),\n                \n                // Copy category info\n                categories: [\n                    cartItem.item_category,\n                    cartItem.item_category2, \n                    cartItem.item_category3,\n                    cartItem.item_category4,\n                    cartItem.item_category5\n                ].filter(cat =\u003e cat), // Remove empty categories\n                \n                // Add original event data for reference\n                bc_cart_value: parseFloat(m.ecommerce.value),\n                bc_variant_sku: cartSku // Keep the original SKU for reference\n            };\n            \n            // Store the original sku before enrichment\n    \t\tconst originalSku = exponea_event_properties.sku;\n            \n            // Enrich with BC data using the cart SKU\n            enrichWithBCData(exponea_event_properties, cartSku, entityId);\n            \n            // Restore the variant SKU (don't let enrichWithBCData override it with the -C value)\n    \t\texponea_event_properties.sku = originalSku;\n            \n            // Copy variant-specific data to match view_item format\n\t\t    if (exponea_event_properties.bc_variant_stock !== undefined) {\n\t\t        exponea_event_properties.stock = exponea_event_properties.bc_variant_stock;\n\t\t    }\n            \n            // Send enriched event to Exponea as cart_update\n            exponea.track(\"cart_update\", exponea_event_properties); // Comment out for testing\n            \n            //console.log('Bloomreach Engagement cart_update event (not sent yet):', exponea_event_properties);\n        }\n    }\n}\n\nnew DataLayerHelper(dataLayer, process, true);","trigger":{"include_pages":[{"type":"any"}],"exclude_pages":null},"_id":"6867e0c80754a62a9c8346cd"},{"uses_overlay":false,"type":"html","parametrized_definition":"\u003cscript async src=\"https://cdn.brcdn.com/v1/siv/br-trk-8118-wrapper.js\" type=\"text/JavaScript\"\u003e\u003c/script\u003e","trigger":{"include_pages":[{"type":"any"}],"exclude_pages":null},"_id":"6928416cf620ff49b27456cc"}],"vars":{"data":[]}}