Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Was my E-Mail Opened? PowerObjects solution using Microsoft Dynamics CRM for email tracking

Post Author: Joe D365 |

If you're sending an email to a friend or to a group of people knowing if an e-mail is read is not important. But if you're sending out an e-mail campaign to 5000 people it's important to know who is reading the e-mail.

Microsoft Dynamics CRM does not track if a person opens an e-mail or if they clicked on a link. One way to handle this is to pay an e-mail tracking company to send the e-mails for you. This can be expensive and take time to plan and send out an e-mail campaign.

Sounds like a business problem, lets find a solution.

Whenever we solve problems we solve 80% up front then enhance the solution as needed. In my case I wanted to simply know who is opening our e-mails. We send out 5000 e-mail every month, who should my sales people be calling first, the people that have opened the e-mail of course.

A simple way to track who has opened an email is to use an HTML e-mail that pulls an image with a tracking token. Sounds easy. Lets look at what has to be done.

First you need a token. That easy. We can track everything if we know the e-mail GUID.

Next we need a public web site that the image can be pulled from. If we link to an image we cannot execute code. So we link to an ASPX page and pass the e-mail GUID. The ASPX page can connect to the CRM system and log the GUID to an entity. This ASPX page will need to read the CRM URL and credentials from the web.config settings (the user account to connect should have very limited access. Write to e-mail entity only). The web.config will also tell us what image to return. This will allow the setup to return a logo or a one pixel image.

We need a place to store the data. One approach is to add attributes to the email entity (first open date, last open date, count). Now we can report who opened an email, when they opened it, the last time it was opened and how many times it was opened. If it's opened multiple times they might be forwarding the e-mail. To know this you would want to also log the IP address the image request came from.

The design is basically done. Now when we send out an e-mail we add an image tag that has an image link that pulls an image from an ASPX page. The image URL has the GUID as an argument and will log the request and return the image binary. How do we get the image link with a specific GUID into 5000 e-mails? One approach is to write a plugin that fires on create of the e-mail. During the create of this e-mail we know a GUID for this e-mail. When should the e-mail be tracked? Where should we insert the image? What URL should be inserted? This information has to be stored in a properties file or a configuration table. We store a token and a URL. Our plug in looks at the e-mail and looks for a given token, if it finds the toke, it replaces it with the tracking URL and GUID.

One thing to consider is how your tracking URL is perceived. If you name your ASPX page tracking.aspx the user might not download the image. If you name your ASPX page getlogo.aspx there will be more positive response to the content. Another issue to over come is how do I know if the e-mail is opened from the e-mail recipient or from with in the CRM system. The image will get pulled no matter who opens the e-mail.

This is all at a high level, but the concept is simple. Add an image tag with a URL tracking token to your e-mail that has a specific GUID so we can identify if this e-mail was opened. Not too difficult, but adds a lot of value to sales team.

Here's what our email entity looks like - the data is right in ms crm!!
emailtracking2

And now that these are just fields in the email messages, we can create advanced finds based on this data....for a marketing campaign these are the folks that we want to call back right away.
emailtracking1

Want to see how it works? Join our mailing list and we will make sure to send you an e-mail and track when it's opened.

How do you extend this concept? What links in the e-mail did they click? That would be great to know...

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

Leave a Reply

Your email address will not be published. Required fields are marked *

14 comments on “Was my E-Mail Opened? PowerObjects solution using Microsoft Dynamics CRM for email tracking”

  1. You are correct this is a common process for tracking an e-mail. The goal here is how do you do it in Microsoft Dynamics CRM.

    The two URL you posted are nothing special. I personally don't want my e-mail sent off to someone else’s servers and have them modify the mail message then forward to the original recipient. I want the message sent from my mail server from my account.

    In the solutions you promoted they track the IP address. It would be easy to track the IP address and have information about the address location but why, this data is already in our CRM we know who we are contacting and know where they are located.

    The important part of this post is you can modify the mail message in the CRM in the message create event. We track more then what I discussed, but the post is to encourage people to think about what can be done. Can we take it further and add a plugin to the email client or a way to append a tracking token in an e-mail sent from outside the CRM sure, but again this tracking is only important when I’m sending an e-mail campaign. I don’t want to see if one e-mail was opened, I want to see how many of 5000 were opened, how many were opened more then once.

    Thanks for your feedback. My guess is a developer will look at your URL’s and hook it into Microsoft Dynamics CRM if they see added value.

  2. Hi,
    I read both url's material that mike posted. I think mike is right. The way in you are trying to track emails really old process.

    But here i also appreciate your search.. Really nice for beginner level CRM developer

  3. Ali –

    Thanks for your comments. You need to be more specific. Why would I rather use a paid service instead of integrating it into our CRM? I assume that after you read the two URL you realized they are selling the same service?

    You say this is really old technology? What do you like technically about the paid service? Are you saying the paid service uses another approach or another technology other then linking in an image tag?

    The problem with the paid service is: “you have to pay”, “your data goes to someone else’s server”, “you can have a higher bounce rate due to going through a different mail server”, “the data is not in your CRM”.

    If a solution works, stick with it. I want to append a tracking token into an e-mail in Microsoft Dynamics CRM, the approach is to code a plug-in to insert on email create event. Developers can take this one step further and track what links are clicked. Benefits: The data is in my system, the e-mail is sent through my e-mail server.

  4. I think the main point of Dean's article is not to invent a better method to track emails, but it is to incorporate such method into MS CRM easily and reliably. Having this data in crm is incredibly powerful.

    And having this capabilities while paying nothing to send emails is even better.

    Allan

  5. Well I agree.. the method outlined is pretty old and simple to explain. The real question is how to do a blast email and get the same results. Not that will make you a wise guy if you can explain 🙂

  6. Have you tried doing it with bulk e-mail? It can be done.

    We sell this component. $799 plus $10 per user. It works great. We do not have a lot of reports built we currently use our dashboard to view results of a bulk e-mail.

    We don't only track who opens the e-mail but we track who clicks what links. Of course with bulk e-mail we allow unsubscribe.

    You can try and write your own plug-ins. It’s done very similar to a sending an e-mail. If you look at the event flow of a bulk e-mail you can easily determine the events to add logic to.

    So yes you can track opened e-mails and clicked links in Microsoft Dynamics CRM bulk e-mails with the concept I described in this blog.

    Dean

  7. Interesting. One question I have is , I do not see the explanation of 'clicked links' in your article. Can you please point me to it ?

  8. This works the same as tracking opens. You add a toke to track URL's. The plugging searches for all URL's in an e-mail and replaces them with a call to a web page that logs the URL was requested (with the tracking token) and then redirects to the original URL.

    Dean

  9. Im asking because me and my group of developer students are in the progress of making a simplar product for our main project(the last before graduating). Our biggest problem at this moment which is stopping us completely is that we can not insert html tags from our plugin application into mail templates. We want to make the email editor ourself to (a small website developer program). Can you guide us the right way. Its the System.Web.HttpRequestValidationException problem

  10. Correct we do sell the e-mail tracking solution.

    There are many moving parts to getting e-mail tracking to work. It's not a simple solution to track open e-mails and clicked links. I'm not sure what you have done so far or how you’re attempting to solve. You have individual e-mails and you have bulk e-mails they are both handled differently. There is no easy way to answer your question or teach you how to work with CRM events.

    Look at the SDK for event information to solve you specific issue.

    Dean

  11. Correct. You do not need the CRM tracking token. The design is to have a plugin modify the e-mail message allowing tracking of who opened and click through URL’s.

    HTH

PowerObjects Recommends