Developing a tracking pixel

后端 未结 5 1307
误落风尘
误落风尘 2020-11-28 01:09

I am trying to build a pixel that would track the current URL the user is on when they visit. I can use either JS (preferred) or a 1x1 image pixel. With JS I am assuming tha

5条回答
  •  旧巷少年郎
    2020-11-28 01:25

    It is a similar problem with this effect, since a call to a function to execute a mark of when the email was seen or opened was introduced in the alt of the pixel, but it does not throw the action correctly.

    Web Bug from https://devorpenguin.des1.net/module/cartabandonmentpro/FrontCartAbandonment?token_cart=87c83b8f77318a54fdd6be91aacc3574&id_cart=1002&action=visualize&wichRemind=1
    
    public static function visualize()
    {
    
        $wichRemind = Tools::getValue('wichRemind');
        $id_cart = Tools::getValue('id_cart');
        $token = Tools::getValue('token_cart');
    
        if ($token == md5(_COOKIE_KEY_.'recover_cart_'.$id_cart)) {
            $query = "UPDATE "._DB_PREFIX_."cartabandonment_remind SET visualize = 1 WHERE wich_remind = ".(int)$wichRemind." AND id_cart = ".(int)$id_cart;
            Db::getInstance()->Execute($query);
        }
    
        header('Content-Type: image/png');
        echo base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=');
    
    }
    

提交回复
热议问题