Advanced Tracking API usage concepts and examples.

Custom Email Tracking and Pixel Tracking

One inventive way to use our HTTP Tracking API is to use it to track your campaign email opens. You probably need to have some development experience to get this working.

Typically, to track marketing email lifecycle events, one would simply install the Woopra integration for the relevant email provider in the Integrations Interface in Woopra. But we haven't integrated with every email platform, and some email marketing tools that we have integrated with, don't have this functionality either in the tool, or in our integration specifically.

So one solution is to use our HTTP Tracking API to do some of what a fully-featured email marketing automation platform does as far as tracking email lifecycle events.

TL;DR

In short, what you will be doing is creating a <img> tag with a source url that will in fact send data to Woopra's tracking servers. Basically a webhook to Woopra from each individual email you send.

Details

So let's say we want to track an event with this basic information in it when someone opens an email:

{
  project: "<your-woopra-project>",
  visitor: {
    email: "*|EMAIL|*", //example merge tag from madril/mailchimp
  	fname: "*|FNAME|*"
  },
  event: {
    name: "email_opened",
    params: {
      email_subject: "*|MC:SUBJECT|*",
      list_name: "*|LIST:NAME|*",
    	campaign_name: "*|CAMPAIGN_NAME|*",
      campaign_id: "*|CAMPAIGN_UID|*",
      campaign_source: "email",
      //etc.
    }
  }
}

We have used merge tags from mailchimp as examples of how to get the data from your email provider. It may be via templated values like merge tags in mandrill or mailchimp, or it may work in some other way, and you'll have to figure this out as part of getting the data into the email.

Once you know how to get all the data you want, compose the above event into a url that hits the Woopra HTTP Tracking API. The above data would look like this:

https://www.woopra.com/track/ce?
	project=woopra-project.com
  &event=email_opened
  &cv_email=*|EMAIL|*
  &cv_fname=*|FNAME|*
  &ce_email_subject=*|MC:SUBJECT|*
  &ce_list_name=*|LIST:NAME|*
  &ce_campaign_name=*|CAMPAIGN_NAME|*
  &ce_campaign_id=*|CAMPAIGN_UID|*
  &ce_campaign_source=email

Finally, You would put this into an html image tag and place that raw html into your emails (perhaps in the signature so that it is always there).

The image tag may look like this:

<img src="https://www.woopra.com/track/ce?project=woopra-project.com&event=email_opened&cv_email=*|EMAIL|*&cv_fname=*|FNAME|*&ce_email_subject=*|MC:SUBJECT|*&ce_list_name=*|LIST:NAME|*&ce_campaign_name=*|CAMPAIGN_NAME|*&ce_campaign_id=*|CAMPAIGN_UID|*&ce_campaign_source=email"/>

Now, whenever that email is rendered, a track event will be sent to Woopra as part of that HTML email rendering. This won't work for email recipients who request text-only emails, or cannot view HTML emails.

Pixel Tracking

response

Alternatively, you can track a 1 by 1 transparent pixel in the email as well. You can use 'response' = pixel. Using this, you can track Email open events.

The image tag will look something like this:

https://www.woopra.com/track/ce/?response=pixel&host=your-project.com&event=email+open&ce_subject=email+subject&cv_email=users.email

Redirect

In addition to pixel tracking, if you wanted to track an email click event, you can use 'redirect' = pageurl. Alternatively, you could use UTM tags but this will track as a pageview with campaign data, rather than an email click event.

To track the click, you would use something like this:

https://www.woopra.com/track/ce/?event=email+click&ce_subject=email+subject&cv_email=123&host=your-project.com&redirect=https://encoded+url+here

🚧

Whitelist Domain

You'll need to whitelist the domain under the Tracking Configuration for redirecting to work.