Téléchargez le Script pixel Twenga
Le pixel Twenga est un outil analytique basé sur du code client à intégrer sur votresite.
Le pixel Twenga doit être installé sur 2 types de page :<script type="text/javascript">function twgb646(t){return t>64&&t<91?t-65:t>96&&t<123?t-71:t>47&&t<58?t+4:43===t?62:47===t?63:0}function twg6b64(t){return t<26?t+65:t<52?t+71:t<62?t-4:62===t?43:63===t?47:65}function twgb64ea(t){for(var e=2,r="",n=t.length,o=0,g=0;g<n;g++)e=g%3,g>0&&4*g/3%76==0&&(r+="\r\n"),o|=t[g]<<(16>>>e&24),2!==e&&t.length-g!=1||(r+=String.fromCharCode(twg6b64(o>>>18&63),twg6b64(o>>>12&63),twg6b64(o>>>6&63),twg6b64(63&o)),o=0);return r.substr(0,r.length-2+e)+(2===e?"":1===e?"=":"==")}function twgs2a(t){for(var e,r,n=t.length,o=0,g=0;g<n;g++)o+=(r=t.charCodeAt(g))<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;e=new Uint8Array(o);for(var a=0,i=0;a<o;i++)(r=t.charCodeAt(i))<128?e[a++]=r:r<2048?(e[a++]=192+(r>>>6),e[a++]=128+(63&r)):r<65536?(e[a++]=224+(r>>>12),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):r<2097152?(e[a++]=240+(r>>>18),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):r<67108864?(e[a++]=248+(r>>>24),e[a++]=128+(r>>>18&63),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):(e[a++]=252+r/1073741824,e[a++]=128+(r>>>24&63),e[a++]=128+(r>>>18&63),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r));return e}String.prototype.trim||function(){var t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(t,"")}}();var TwgT={sendRequest:function(t){var e="",r=t.host,n=t.event;if(delete t.host,delete t.event,r&&n){r=r.replace(/\/+$/,""),e=n+"_"+twgb64ea(twgs2a(JSON.stringify(t)))+".png";var o=document.createElement("img");o.src=r+"/t/"+e,document.body.appendChild(o)}}};</script>
<script type="text/javascript">function twgb646(t){return t>64&&t<91?t-65:t>96&&t<123?t-71:t>47&&t<58?t+4:43===t?62:47===t?63:0}function twg6b64(t){return t<26?t+65:t<52?t+71:t<62?t-4:62===t?43:63===t?47:65}function twgb64ea(t){for(var e=2,r="",n=t.length,o=0,g=0;g<n;g++)e=g%3,g>0&&4*g/3%76==0&&(r+="\r\n"),o|=t[g]<<(16>>>e&24),2!==e&&t.length-g!=1||(r+=String.fromCharCode(twg6b64(o>>>18&63),twg6b64(o>>>12&63),twg6b64(o>>>6&63),twg6b64(63&o)),o=0);return r.substr(0,r.length-2+e)+(2===e?"":1===e?"=":"==")}function twgs2a(t){for(var e,r,n=t.length,o=0,g=0;g<n;g++)o+=(r=t.charCodeAt(g))<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;e=new Uint8Array(o);for(var a=0,i=0;a<o;i++)(r=t.charCodeAt(i))<128?e[a++]=r:r<2048?(e[a++]=192+(r>>>6),e[a++]=128+(63&r)):r<65536?(e[a++]=224+(r>>>12),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):r<2097152?(e[a++]=240+(r>>>18),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):r<67108864?(e[a++]=248+(r>>>24),e[a++]=128+(r>>>18&63),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):(e[a++]=252+r/1073741824,e[a++]=128+(r>>>24&63),e[a++]=128+(r>>>18&63),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r));return e}String.prototype.trim||function(){var t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(t,"")}}();var TwgT={sendRequest:function(t){var e="",r=t.host,n=t.event;if(delete t.host,delete t.event,r&&n){r=r.replace(/\/+$/,""),e=n+"_"+twgb64ea(twgs2a(JSON.stringify(t)))+".png";var o=document.createElement("img");o.src=r+"/t/"+e,document.body.appendChild(o)}}};</script> <script type="text/javascript"> var oTwgTConfig = { "host": "https://%host%", "master_site_id": "%master_site_id%", "event": "pp", "ref_id": "%item_feed_reference_id%", "variant_id": "%item_feed_variant_id%", "currency": "%currency_iso_code%", "country":"%country_iso_code%", "price": "%price_including_taxes%" }; TwgT.sendRequest(oTwgTConfig); </script>
<script type="text/javascript">function twgb646(t){return t>64&&t<91?t-65:t>96&&t<123?t-71:t>47&&t<58?t+4:43===t?62:47===t?63:0}function twg6b64(t){return t<26?t+65:t<52?t+71:t<62?t-4:62===t?43:63===t?47:65}function twgb64ea(t){for(var e=2,r="",n=t.length,o=0,g=0;g<n;g++)e=g%3,g>0&&4*g/3%76==0&&(r+="\r\n"),o|=t[g]<<(16>>>e&24),2!==e&&t.length-g!=1||(r+=String.fromCharCode(twg6b64(o>>>18&63),twg6b64(o>>>12&63),twg6b64(o>>>6&63),twg6b64(63&o)),o=0);return r.substr(0,r.length-2+e)+(2===e?"":1===e?"=":"==")}function twgs2a(t){for(var e,r,n=t.length,o=0,g=0;g<n;g++)o+=(r=t.charCodeAt(g))<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;e=new Uint8Array(o);for(var a=0,i=0;a<o;i++)(r=t.charCodeAt(i))<128?e[a++]=r:r<2048?(e[a++]=192+(r>>>6),e[a++]=128+(63&r)):r<65536?(e[a++]=224+(r>>>12),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):r<2097152?(e[a++]=240+(r>>>18),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):r<67108864?(e[a++]=248+(r>>>24),e[a++]=128+(r>>>18&63),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r)):(e[a++]=252+r/1073741824,e[a++]=128+(r>>>24&63),e[a++]=128+(r>>>18&63),e[a++]=128+(r>>>12&63),e[a++]=128+(r>>>6&63),e[a++]=128+(63&r));return e}String.prototype.trim||function(){var t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(t,"")}}();var TwgT={sendRequest:function(t){var e="",r=t.host,n=t.event;if(delete t.host,delete t.event,r&&n){r=r.replace(/\/+$/,""),e=n+"_"+twgb64ea(twgs2a(JSON.stringify(t)))+".png";var o=document.createElement("img");o.src=r+"/t/"+e,document.body.appendChild(o)}}};</script> <script type="text/javascript"> var oTwgTConfig = { "host": "https://%host%", "master_site_id": "%master_site_id%", "event": "tx", "order_id": "%order_id%", "currency": "%currency_iso_code%", "country":"%country_iso_code%", "attribution_weight": "%attribution_weight%", "items": [ {"ref_id": "%item_feed_reference_id%", "variant_id": "%item_feed_variant_id%", "qty": "%quantity", "price_et": "%price_excluding_taxes%"}, {"ref_id": "%item_feed_reference_id%", "variant_id": "%item_feed_variant_id%", "qty": "%quantity", "price_et": "%price_excluding_taxes%"} /* add a line for each item in the user's basket */ ] }; TwgT.sendRequest(oTwgTConfig); </script>
Téléchargez le Script pixel Twenga