Setup : Post-click tracking (Standard)

Configuring Post-click tracking is a two stage process, involving the email message and your website.

Standard Setup : JavaScript

(i.e. OnClick events)

1. Email Message

  • First create a special tracked link in the email message:
     <a href="http://www.foo.com/salespage.html?_pureTrackingName=FOOSALES"> SHOPPING PAGE </a> 
    

2. Website

  • Download and extract the Code Sample
  • There is a JavaScript file in this archive that creates and manages a cookie in the recipients browser session. As well as holding a trackPage function
  • Include this file on all destination pages (link addresses in the email campaign) that you'd like to track on your site.
    <script type="text/javascript" src="emailTracking.js" ></script>
  • Ensure to call the function that creates the tracking cookie.
    <script language="javascript">
        createTrackingCookie();
    </script>
  • Once the cookie has been created, all subsequent pages will be auto tracked by the cookie and reported back, without requiring the cookie be regenerated. This assumes the browser session isn't ended.

3. Tracking website events

  • To track website events the page must include the email tracking javascript file, even if it is not a destination page.
    <script type="text/javascript" src="emailTracking.js" ></script>
  • Tracking an event is as simple as adding an onClick attribute to a button and calling the function trackPage. function creates an image in the DOM (Document Object Model) that isn't affixed to a parent. The act of setting a SRC attribute for this causes a GET request on the Pure Response tracking end point.
    <input type="button" value="Buy!" onclick="javascript: trackPage('sale', '19.99');" />
    <input type="button" value="Signup!" onclick="javascript: trackPage('registration', 'joe.bloggs');" />

Alternative Setup : Non JavaScript

(i.e. on a page load)

1. Email Message

  • First create a special tracked link in the email message:
     <a href="http://www.foo.com/salespage.html?_pureTrackingName=FOOSALES"> SHOPPING PAGE </a> 
    

2. Website

3. Use an Img Tag to force a GET request on Page Load

  • A HTML tag can be used that makes a direct GET request to a given location with URL parameters, for instance using the IMG tag. This can generate the event in the report.
    <img 
    src="http://response.pure360.com/_act/tracking.php?_pureTrackingName=FOOSALES&type=SALE&desc=49.99" />
  • The above link would perform a GET request to the tracking endpoint, accessing the process called "FOOSALES", with the "TYPE" as "SALE" and the value as "49.99". The Response platform will lookup the recipients mailId in the cookie generated in the browser session clicking the link in the email, and tie the request back to the recipient and the campaign report.