How do I track emails that my PHP application sends out?
Moderator: General Moderators
-
JoefromPhilly
- Forum Newbie
- Posts: 8
- Joined: Sat May 31, 2008 3:36 pm
How do I track emails that my PHP application sends out?
Greetings,
I have an application that sends out personalized emails for my clients to their subscribers. I want to be able to tell them how many of these emails get opened. How do I embed some code in the email so that it forces a hit to the server and my mysql db to register when someone opens one of their emails?
Thanks in advance for your help!
- Joe Kamenar
I have an application that sends out personalized emails for my clients to their subscribers. I want to be able to tell them how many of these emails get opened. How do I embed some code in the email so that it forces a hit to the server and my mysql db to register when someone opens one of their emails?
Thanks in advance for your help!
- Joe Kamenar
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: How do I track emails that my PHP application sends out?
The techniques used no longer really work, if they do, the stats are not very accurate.
-
JoefromPhilly
- Forum Newbie
- Posts: 8
- Joined: Sat May 31, 2008 3:36 pm
Re: How do I track emails that my PHP application sends out?
Ok, I do understand that certain email readers and services disable stuff like this, but assuming that it would work, how does one do this? I can do a test to see how well it does or does not work.
- Joe
- Joe
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: How do I track emails that my PHP application sends out?
I don't think you're going to get much help from anyone here. This is basically a form of phishing.
Re: How do I track emails that my PHP application sends out?
Maybe I misunderstood what is meant, but don't the regular email services like Campaignmonitor do exactly this? After I've sent a mail campaign I can see how many people opened the email, which links were clicked, by whom, when, etc
Re: How do I track emails that my PHP application sends out?
I wouldn't go as far as calling it phishing. The problem with this comes down to spammers. You can embed images into an e-mail with a unique id so that you can tell who and how many people have read it. The problem is that spammers can use this information to validate e-mail addresses. Virtually all e-mail programs and providers such as gmail and yahoo do not render images because of this.
I personally have images disabled even on e-mails I receive from opt-in mailing lists. Any statistics you gather from this would be incredibly inaccurate.
With that said, you need to put a unique image beacon into each e-mail.
Then in beacon.php
I personally have images disabled even on e-mails I receive from opt-in mailing lists. Any statistics you gather from this would be incredibly inaccurate.
With that said, you need to put a unique image beacon into each e-mail.
Code: Select all
<img src="http://mysite.com/tracking/beacon.php?id=user_id" height="1" width="1" />
Code: Select all
if (isset($_GET['id']) && preg_match('#^[0-9]{1,12}$#', $_GET['id']))
{
// update stats
}
// send an image header and passthru a transparent 1 pixel gif
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: How do I track emails that my PHP application sends out?
I agree with Chris, in that embedding images and performing link tracking, etc. Spammers can use this to fish out valid emails when sending out millions.
There are products like CampaignMonitor (all of them do this actually) that use hidden images or link tracking to give you an idea as to the efficacy of any given campaign. But when someone just asks, considering it's a simple solution, I wonder if they aren't going to hammer out some quick script to send a million emails and make my entry into the industry even more difficult.
There are products like CampaignMonitor (all of them do this actually) that use hidden images or link tracking to give you an idea as to the efficacy of any given campaign. But when someone just asks, considering it's a simple solution, I wonder if they aren't going to hammer out some quick script to send a million emails and make my entry into the industry even more difficult.
-
JoefromPhilly
- Forum Newbie
- Posts: 8
- Joined: Sat May 31, 2008 3:36 pm
Re: How do I track emails that my PHP application sends out?
Thanks for the input. For the record, I am not a phisher or spammer. One of my domains where I do email campaigns for clients is at http://DripMarketingPortal.com. I am also working on offering an opt-in email marketing service for local merchants, where I use the guts of my existing portal, but be able to tell the client what percentage of the emails he or she sends out gets opened.
On the corporate level, I know that companies such as Merck look at the open rates of the emails they send out to those who opt-in to receive them, such as physicians. I work for an agency of theirs (Harte-Hanks), and we also monitor the open rates for other client emails that are sent out from a sister company, Postfuture.
Is there not a way that this can be done by inserting a javascript call in the HTML email body? I know that web analytics packages that use tagging do this so that a forced call is made to the data tag collection server (as in WebTrends, on demand). If a javascript call can be made, does this get around the issue of images not being recognized?
Again, thanks for the help and you are not supporting a phisher!
- Joe Kamenar
http://HotHomeBasedJobs.com
On the corporate level, I know that companies such as Merck look at the open rates of the emails they send out to those who opt-in to receive them, such as physicians. I work for an agency of theirs (Harte-Hanks), and we also monitor the open rates for other client emails that are sent out from a sister company, Postfuture.
Is there not a way that this can be done by inserting a javascript call in the HTML email body? I know that web analytics packages that use tagging do this so that a forced call is made to the data tag collection server (as in WebTrends, on demand). If a javascript call can be made, does this get around the issue of images not being recognized?
Again, thanks for the help and you are not supporting a phisher!
- Joe Kamenar
http://HotHomeBasedJobs.com
-
JoefromPhilly
- Forum Newbie
- Posts: 8
- Joined: Sat May 31, 2008 3:36 pm
Re: How do I track emails that my PHP application sends out?
One other question - in the example you provided, you had a line that says to send an image header and pass thru a transparent 1 pixel gif. How is this done so that nothing else gets messed up?
- Joe Kamenar
- Joe Kamenar
Re: How do I track emails that my PHP application sends out?
Image beacons do not work. Every common email client disables images until the user requests them, so most users won't fetch the image even if they've read the content. Thus your stats will be incredibly inaccurate.
Tracking links likewise don't work. Users are savvy enough now not to click links in emails because of the phishing dangers. Using links will result in wildly inaccurate stats too.
Javascript won't work because it's stripped out by every major webmail service around (eg gmail, hotmail and yahoo).
The only accurate method of tracking left is give the users a code that the enter into your website and count the number of people who use it. That means that you need to give something away... like a 10% discount or something. Even this method isn't *very* accurate because users can share simple codes and uniquely tailored codes are always complex enough to put some users off bothering.
I maintain an email marketing app that sends out well over 1,000,000 marketing newsletters every month. It's the number one complaint our clients have, and I'm sick to death of explaining the problems.
Tracking links likewise don't work. Users are savvy enough now not to click links in emails because of the phishing dangers. Using links will result in wildly inaccurate stats too.
Javascript won't work because it's stripped out by every major webmail service around (eg gmail, hotmail and yahoo).
The only accurate method of tracking left is give the users a code that the enter into your website and count the number of people who use it. That means that you need to give something away... like a 10% discount or something. Even this method isn't *very* accurate because users can share simple codes and uniquely tailored codes are always complex enough to put some users off bothering.
I maintain an email marketing app that sends out well over 1,000,000 marketing newsletters every month. It's the number one complaint our clients have, and I'm sick to death of explaining the problems.
-
JoefromPhilly
- Forum Newbie
- Posts: 8
- Joined: Sat May 31, 2008 3:36 pm
Re: How do I track emails that my PHP application sends out?
Thanks for the input. I may just scrap the open rate idea.
- Joe
- Joe
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: How do I track emails that my PHP application sends out?
I have to agree with the herd, it's just not feasible these days.
Focus on having good, relevant content instead.
Focus on having good, relevant content instead.