Barion pixel and Cookie consent

Have more questions? Submit a request

What is Barion Payments? 

Barion Payments is a secure online payment gateway that facilitates seamless transactions for website owners. It offers a user-friendly platform for processing payments through various methods, including credit cards, bank transfers, and mobile wallets. Barion Payments provides real-time transaction tracking, fraud prevention, and detailed analytics to enhance business operations. It also features advanced advertising capabilities, allowing businesses to target customers with personalized offers based on purchase behavior. By integrating Barion, website owners can offer their customers a smooth and reliable checkout experience, boost conversion rates, and gain valuable insights into consumer behavior, all while ensuring robust security measures.

 

How do I send consent data to the Barion pixel?

To effectively use the Barion pixels for analytical and advertising functions it's needed to make sure the consent changes can be propagated to the Barion pixel. More documentation can be found in their helpdesk here.

We have created a helper script that will make sure the correct signals are sent to the Barion Pixel. Add the following script to your website. 

 

 


        <script>
    function handleConsentChange(e) {
        var consent = e.detail || {};
        var advertisingConsent = consent.advertising || null;

        if (advertisingConsent === true) {
            bp('consent', 'grantConsent');
        } else if (advertisingConsent === false || advertisingConsent === null) {
            bp('consent', 'rejectConsent');
        } else {
            console.error('Unexpected advertising consent value:', advertisingConsent);
        }
    }

    window.addEventListener('cf_consent', handleConsentChange);
    window.addEventListener('cf_consent_loaded', handleConsentChange);
</script>
      

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share