Sunday, November 14, 2010

Transactional Email integration with Google Analytics

Google Analytics integration is now available with transactional email sent through the SMTP relay or through the API.

To start tracking your transactional email with Google Analytics, first turn on Google Analytics in your JangoSMTP account. Click the Edit Icon next to Google Analytics Integration under Settings --> Tracking and follow the steps outlined in the Procedure section.




Transactional email with click-tracked links will take the recipient to a URL that looks like this:

http://www.browniekitchen.com/?utm_source=JangoMail&utm_medium=Email&utm_campaign=Welcome+Group+(22514)&utm_content=ajay.goel%gmail.com

For transactional email, the Campaign Name inside your Google Analytics account will be the Transactional Group Name inside your JangoSMTP account. And the Content inside your Google Analytics account will be the email address of the recipient.

For transactional email, it wouldn't make sense to use each individual email's Subject line, because if you send 1,000 transactional emails, all with different Subject lines, you'll end up with 1,000 different campaigns in your Google Analytics account, and making sense of the data would be impossible. That's why transactional emails will be categorized by their Transactional Group Name and not their Subject.

You may use any combination of these values in the four Google Analytics variable fields:

%%EmailAddress%% = the email address of recipient
%%TransactionalGroupName%% = the Transactional Group Name of a transactional email
%%TransactionalGroupID%% = the Transactional Group ID of a transactional email




To set this up...

1. You must have click-tracking enabled on your transactional email. If using the SMTP Relay, check the Activate Click Tracking checkbox under Settings --> Tracking --> General. If using the transactional email API, set "ClickTracking=True" in the Options input parameter of one of the following methods:

SendTransactionalEmail
SendTransactionalEmailFromTemplate

2. Turn on Google Analytics by checking the box under Settings --> Tracking --> Google Analytics Integration, as shown in the second screenshot.