Posted By

anobre on 12/08/09


Tagged

zahir


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

luman


add tracking pixel function


 / Published in: JavaScript
 

use: add_pixel("tag")

  1. var add_pixel = function(p) {
  2. var ord = Math.random().toString();
  3. if((p.charAt(p.length-1) === "=") || (p.charAt(p.length-1) === "?")){
  4. p += ord;
  5. }
  6.  
  7. img = new Image(1,1)
  8. img.src = p;
  9. img.style.display="none";
  10. return img;
  11. };

Report this snippet  

You need to login to post a comment.