Alap-es-full-barion-pixel-implementacio-RequireJS-Magento-webaruhazakban
Az Alap és Teljes Barion Pixel implementálása RequireJS és/vagy Magento környezetben
A RequireJS konfiguráció módosítása
<script>
require.config({
paths: {
'barionPixel': 'https://pixel.barion.com/bp.js'
}
});
</script>
A Bairon Pixel inicializálása a RequireJS segítségével
<script>
require(['barionPixel'], function() {
window.barionpixel_function = 'bp';
// Create BP element on the window
window["bp"] = window["bp"] || function () {
(window["bp"].q = window["bp"].q || []).push(arguments);
};
window["bp"].l = 1 * new Date();
window['barion_pixel_id'] = 'BP-0000000000-00';
// Send init event
bp('init', 'addBarionPixelId', window['barion_pixel_id']);
});
</script>
<noscript>
<img height="1" width="1" style="display:none" alt="Barion Pixel" src="https://pixel.barion.com/a.gif?ba_pixel_id='BP-0000000000-00'&ev=contentView&noscript=1">
</noscript>
FONTOS!