Mobile app version of vmapp.org
Login or Join
Caterina187

: Tracking email via analytics I need to do email analytics, aim is to create an endpoint where when user sends an email to contact@mycompany.com, the email is processed and data in email is

@Caterina187

Posted in: #Analytics #AnalyticsApi #Email #GoogleAnalytics #Tracking

I need to do email analytics, aim is to create an endpoint where when user sends an email to contact@mycompany.com, the email is processed and data in email is used for google analytics conversion.

main challenge I am facing is to create the endpoint, I am comfortable with PHP and client side js, but don't have idea about email tracking.

Help would be appreciated.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina187

1 Comments

Sorted by latest first Latest Oldest Best

 

@Pope3001725

We ran into this same exact issue a while ago. Here is the solution that worked for us. We use postfix for our mail servers. We setup a 2nd domain name to host our marketing email. This domain is setup with a catch all mailbox. When we send emails we send them with a different address and reply-to each time. (We have our own script for sending emails, which generates a random email (like craigslist) every time we send an email.

Then we wrote a small perl script that amavis/postfix calls whenever an email is replied to. This script triggers a php script which tracks the Action using Google Analytics for web. This is far more accurate than the solutions provided for email tracking by google, which only really track links in your email messages.

If setting up your own mail server is not an option, please consider MailGun. Mailgun was what we used for our first attempt at this and it worked flawlessley. What mailgun does is adds extra info to the mail header. That way mailgun automatically tracks opens, reads, replies, etc. If you really need that data in GA as we did, then you could have mailgun notify your server whenever there is an event. Mailgun just calls a webpage on your server and posts all the details about the event. Next you can have your server use the google analytics mobile api or the PHP api on GoogleCode to track the event.

You may want to keep mail analytics seperate from google analytics. Its hard to consolidate the data, and the cookies dont always match up. If its just your goal to track performance of your email campaigns, mailgun, mailchimp, and even sendgrid do good work with that. A service like ChartBeat can be used to mix data from the both.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme