add tracking pixel function


/ Published in: JavaScript
Save to your folder(s)

use:
add_pixel("tag")


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.