Also, there is now a MUCH simpler and easier way to do this. It’s one of the hacks presented in our 2014 12 Hacks of Christmas series. Check it out here.
A common request from advanced users, is to perform actions when an email is opened. By default, Infusionsoft tracks who opens the emails sent through it. You can see the pretty pie chart of who opened and clicked in the Email Batch Status Report. But, have you ever wanted to tag people who open an email? Or start them on a follow-up sequence? Or run any other kind of action? Well, it’s now possible.
This request has always been a challenge to do until now. We had a need for this to help us make our follow-up sequences even more targeted for prospect and customer needs. This feature is not natively built into the application yet, but you can accomplish the same thing using the API.
Here’s how it works:
- 1-Pixel Image — Open rates are always tracked in HTML emails by using a 1-pixel image. This case is no different. The image needs to be served by a server-side script though. (One pixel is very tiny and is invisible to people.)
- Action Set — Before you write the image script, go set up an Action Set for when someone opens your email. Note the action set ID. Some people are confused by Action Sets, so if you are, do not continue reading and head over to the Fusebox to read up on them. Trust me on this one.
- Server-side Script — Next go write a server-side script (using PHP, ASP, Java, whatever you prefer) that accepts a contact ID and an action set ID in the Query String and then spits out the 1-pixel image.
- Image Code — Lastly, add the 1-pixel image code to your HTML email template.
I’ve provided an example of this implementation in PHP. I created an action set that adds a tag and starts a follow up sequence. The action set id is 1314. It may be quick and simple, so if you have any suggestions to clean it up, let me know.
In the HTML code of my HTML email template I’m going to include an image pointing to the script:
So, I’m dynamically passing the contact ID to the script and made reference the Infusionsoft Action Set ID.
The PHP code for the image script looks like this (note I’m using the PHP SDK to connect using the API):
< ?php include("../isdk.php"); $app = new iSDK(); $app->cfgCon("testacct"); $as = $app->runAS((int)$_REQUEST['cid'],(int)$_REQUEST['asid']); header("Content-type: image/png"); $im = @imagecreate(1,1) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($im, 255, 255, 255); imagepng($im); imagedestroy($im); ?>
Sorry this got a little technical, but thanks to Justin Morris (aka our API Ninja), this script can do wonders for knowing more about your prospects and customers and continuing to improve response from your emails.
With this script, you’ll be able to do amazing things. It will greatly help you in performing intelligent email marketing and powerful lead scoring. By doing this, you can do anything when someone opens your next e-mail from Infusionsoft. I can tell you that we’ve had very successful results from this implementation.
If you have feedback, questions or comments — I’d love to hear from you in the comments below!