Page 1 of 1

Email Functionality: Tracking email open and click

Posted: Fri Jul 25, 2014 2:10 am
by retaildev
Hi,

I have been trying to use email functionality in our application, i have seen there are database tables for email tracking and open rate.
Also, there is one servlet and one filter to do this task.

EmailOpenTrackingServlet
EmailClickTrackingFilter

but these are not configured anywhere in the application and not integrated as such.

Need to know how this functionality works ?

Thanks
Dev

Re: Email Functionality: Tracking email open and click

Posted: Tue Jul 29, 2014 3:03 pm
by phillipuniverse
That's a feature that is in Broadleaf but one that we have not really used or fleshed out in quite some time.

Just looking at the code is relatively self-explanatory -- in your email you would include an 'email_id' request parameter for whatever URL it is. That will activate the EmailClickTrackingFilter (after you hook it up in the filter chain; see applicationContext-filter.xml in your custom site).

The servlet is so that you can hook that up to your application and record the fact that the email has been opened. You will need to include an image where the src is a URL under the EmailOpenTrackingServlet. That servlet will return an empty gif that should display in the user's email client on request. Not sure if this will specifically work for Gmail since Google has now started caching all images: http://blog.mailchimp.com/how-gmails-im ... -tracking/.