php - Pixel tracking for email messages per user and per message -


i want track email opens pixle tracking,each user has id in database , need know opened message , message , not general open rate.

my question need have pixle image different name per message , per user?

you can have same image emails different paths making them resolve same one.

so, image example.com/bla/index.php?msg=1&img=white.jpg , this:

<?php // here goes more php ($db initialization, etc)  if (!empty($_get['img']) && !empty($_get['msg']))   $sth = $db->prepare('insert seen (`message`) values (?)');   $sth->execute(array($_get['msg'])); header('location: /images/white.jpg'); ?> 

i used similar ajax, although using .htaccess , paths example.com/faces/89y3gf34gho.jpg (which converted internally example.com/faces/index.php?face=89y3gf34gho.jpg)

note many users consider small tracking white image offensive, so, unleast make dedicate site imtrackingyou.com/track/index.php?msg=36&img=white.jpg , hiding that's not image , doing desirable. these purpose, example.com/bla/5475.jpg better example.com/bla/index.php?msg=1&img=white.jpg. can achieved apache's mod_rewrite.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -