[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

track open rate of email newsletter

Posted on 2010-04-03
7
Medium Priority
?
1,213 Views
Last Modified: 2013-11-07
hi folks,

I am sending the newsletter to some of the users. I want to track whether they have opened the newsletter or not programmatically.

how can i achieve this?

Any help will be appreciated.
0
Comment
Question by:dotsandcoms
7 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 29543138
>>I am sending...

You can't, the best you can hope for is to ask them to inform you they have done so.
0
 
LVL 5

Accepted Solution

by:
darshan_derasari earned 1000 total points
ID: 29550146
Hi dotsandcoms,

I assume that you have a table which contains user information and also a table which
contains information related to newsletter sent to which user. Add a field named
"bOpened" to this newsletter sent table.

In the email content of newsletter add 1x1 pixel image at the bottom of source and set a
image source to point to the webpage located on your site which keeps track of opened
newsletter emails.

<img src="http://www.xyz.com/trackopenemail.aspx?newslettersentID=[PK]">

PK = Here you need to fill primary key from newsletter sent table.

In the trackopenemail.aspx page, you need to write necessary code which reads querystring
value and set bOpened = 1 for that record in newsletter sent table and also return 1X1
pixel image in response.

This way you can achieve this functionality.

Hope this helps.
0
 
LVL 9

Expert Comment

by:Gorkem Yuksel
ID: 29683526
If you have told your customers that you will be placing becon images in newsletters, then you are within your right to place a transparent 1px by 1px image inside your email.  Point this becon image to be an ASPX page that can keep track in a database of the number of hits to it.

Cheers,

G.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 3

Expert Comment

by:the_bill
ID: 29713722
Its a tricky thing to do, because most mail clients will block images, because thats how spammers confirm a working email address, so your stats, if using images, wont be completely accurate.

Another way would be to require a read receipt, but a lot of web based emails dont support this, and even if it does, some people just ignore it or choose not to send it.

You could use a cheeky JavaScript that launched on page load to call a handler page that updated your database, but the user could be reading mail whilst offline, or the script could be blocked.

If this is a request from the marketing team, I'd advise them that there's no certain way of knowing how many people have read the newsletter :)
0
 

Author Comment

by:dotsandcoms
ID: 29756064
hi darshan_derasari,

how can i return the image in response.

I am using the below coding but not getting the image in return:

 PowerGeneralFunction objGen;
   
    string strQuery = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["campid"] == null)
        {
            if (Request.QueryString["campid"].ToString() == "")
            {
                Response.Redirect("http://www.cocoona.ae/");
            }
        }

        if (Request.QueryString["emailid"] == null)
        {
            if (Request.QueryString["emailid"].ToString() == "")
            {
                Response.Redirect("http://www.cocoona.ae/");
            }
        }

        this.Camp_Details();
    }
    protected string Camp_Details()
    {
        int result = 0;
        objGen = new PowerGeneralFunction();


        try
        {
            strQuery = "Insert into campaignRead (campid,nemail,addedip,addeddate,readnl) values ( " + Request.QueryString["campid"].ToString().Replace("'", "&#39;") + ",'" + Request.QueryString["emailid"].ToString().Replace("'", "&#39;") + "','" + this.FinalIP() + "','" + System.DateTime.Now + "',1)";
            result = objGen.InsertUpdateDeleteCommand(strQuery);
            if (result > 0)
            {
                return "http://www.cocoona.ae/images/knews.jpg";
            }

        }
        catch (Exception ex)
        {
            return "http://www.cocoona.ae/images/knews.jpg";

        }
        finally
        {
            strQuery = "";
           
            objGen = null;
        }

        return "http://www.cocoona.ae/images/knews.jpg";
    }

    public string FinalIP()
    {
        string strHostName = "";
        strHostName = System.Net.Dns.GetHostName();
        IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(strHostName);
        IPAddress[] addr = ipEntry.AddressList; return addr[addr.Length - 1].ToString();
    }
0
 
LVL 3

Assisted Solution

by:the_bill
the_bill earned 1000 total points
ID: 29769596
System.Drawing.Image myImage = System.Drawing.Image.FromFile(path);
MemoryStream tempStream = new MemoryStream();
myImage.Save(tempStream,ImageFormat.Gif);
Response.ClearContent();
Response.ContentType = "image/gif";
Response.BinaryWrite(tempStream.ToArray());
Response.End();
0
 

Author Closing Comment

by:dotsandcoms
ID: 31710521
thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses
Course of the Month9 days, 10 hours left to enroll

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question