chasethemetal Posted August 7, 2011 Share Posted August 7, 2011 Hey all,So I am currently writing a nice little application that allows users to create email flyers then blast them out to fellow email list subscribers. Initially I was planning on tracking by placing an iFrame in the email body that was 0x0 which inside holds my tracking scripts. Though quickly I found out this is impossible as most email clients like Gmail and the such don't allow them to load... So after some quick research I believe most people accomplish this by placing a small invisible image in the email then they track how many times that image was rendered...I guess my question is, does anyone have any good ideas about how to track emails that are opened? Does the image thing work and if so could someone show me a how to or point me to one on the internet... I tried googling but to my dismay I didn't find anything detailed enough... Maybe I am not searching the right terms.btw my sites running on an apache server in a shared host environment...and the end goal is to get that number in an mysql column, updating as people open...pstoo bad iframes don't work because all I needed was a simple SET readEmail = (readEmail + 1) in the frame to get my desired data. Link to comment Share on other sites More sharing options...
Man In Tan Posted August 8, 2011 Share Posted August 8, 2011 Do you use PHP? If so, use an <img/> in your email, pointing at something like "http://domain.tld/tracker.php", and run a script from there. <?phpheader(Content-Type: image/png);readfile('/path/to/image.png');//insert code to run here: SET readEmail = (readEmail + 1) Link to comment Share on other sites More sharing options...
chasethemetal Posted August 8, 2011 Author Share Posted August 8, 2011 Ok so if I get what your saying its simpler than I thought...Like it could look like this <img src="http://www.site.com/script.php" />And in the php script just include an image in the header so something actually renders? Link to comment Share on other sites More sharing options...
trevelluk Posted August 8, 2011 Share Posted August 8, 2011 One thing to bear in mind about this technique is that a lot of email clients and web-based email providers (Hotmail, GMail etc) will not load remote images unless they are specifically asked to, precisely to prevent this sort of tracking. So just bear in mind that the open rates you see will most likely be lower than the actual open rates. Link to comment Share on other sites More sharing options...
chasethemetal Posted August 8, 2011 Author Share Posted August 8, 2011 Yes I figured that much as I am a gmail user. But luckily for me the emails we are sending contain graphic material. Barley any text. So I figure mosstt people will choose to display the images. Fingers crossed. Ok thanks for everyones help. Link to comment Share on other sites More sharing options...
chasethemetal Posted August 11, 2011 Author Share Posted August 11, 2011 So I tried this method <?phpheader(Content-Type: image/png);readfile('/path/to/image.png')tracking script here?> And in Gmail the image is rendered, but the tracking script doesnt seem to run. But if I right click and view the script from my server in my browser it works fine... It is strange to me that gmail will render the image but it doesnt trigger the rest of the script on my server...Thoughts? Link to comment Share on other sites More sharing options...
chasethemetal Posted August 11, 2011 Author Share Posted August 11, 2011 Also... I've noticed that gmail will render my transparent png as black.. hmmm. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.