backup: weiche ad costumer

by mtenschert

JavaScript

if (has_gclid || has_gclsrc) {
        /**
         * set initial_product_development_already_ad_customer cookie if costumer clicked ad
         */
            var already_ad_customer = "already_ad_customer";
            function setCookie(key, value) {
                var expires = new Date();
                expires.setTime(expires.getTime() + (58 * 24 * 60 * 60 * 1000));
                document.cookie = key + '=' + value + ';expires=' + expires.toUTCString();
            }
            setCookie(already_ad_customer, 1);
        }


/**
         * read initial_product_development_already_ad_customer cookie
         */
        var cookie = "already_ad_customer";
        var getCookie = function(cname) {
            var name = cname + "=";
            var decodedCookie = decodeURIComponent(document.cookie);
            var ca = decodedCookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') {
                    c = c.substring(1);
                }
                if (c.indexOf(name) == 0) {
                    return c.substring(name.length, c.length);
                }
            }
            return '';
        }
        var checkCookie = function() {
            cookie = getCookie(cookie);
        }
        checkCookie();

        
        // mouseflow.com UX tool for ALPINRESORTS.com FR || GCLID || already_ad_customer "cookie active" account only
        if (has_gclid || has_gclsrc || cookie > 0) {
            console.log("initial_product_development.js: www.alpinresorts.com fr user - gclid || gclsrc || || already_ad_customer \"cookie active\"  and mouseflow.com is working");

            window._mfq = window._mfq || [];
            (function() {
                var mf = document.createElement("script");
                mf.type = "text/javascript"; mf.async = true;
                mf.src = "//cdn.mouseflow.com/projects/26990135-73a8-46ef-97a1-1c1f4ee593d6.js";
           ...