Postalytics campaigns are able to track the online response of each piece of mail by utilizing industry standard JavaScript tracking code - at no extra cost.  The great part of it is, you get access to rich online response data without needing to build new landing pages in 3rd party tools, like the old-fashioned pURL/QR systems.

The Postalytics tracking code can work with your existing web, ecommerce, or landing page system to track each person's response uniquely. If the recipient came from a CRM or Marketing Automation tool via a Postalytics integration, you can even sync the response stats back to the source system. 

Better yet, you have the option of personalizing your landing pages using the pURL/QR and tracking code features. This article is meant to be read along with the Landing Page Personalization Options.

Postalytics Tracking Code Quick Reference Do's and Don'ts:

Do:

  • Place the Postalytics tracking code into the HTML, before the closing </body> tag, of each page that will be tracked OR set up the tracking code in Google Tag Manager as a "Custom HTML" tag to be fired on all of the pages that you want Postalytics to track. 

  • Make sure the pages being tracked share the same root domain/are on the same website. For example: 

                    Starting URL - www.postalytics.com

                    Conversion/Goal URL - www.postalytics.com/demo

  • Test that the tracking code is properly placed by validating* the web URL in the Tracking Code section on the Integrations page in your Postalytics account.

*note: This validation tool is in place to check that the tracking code is properly installed on your website. It does not test or validate that the tracking will work correctly within the Campaign Dashboard. Please see our help article, "How to Test your pURLs and QR Codes" for instruction on how to test pURLs or QR Codes to ensure tracking is enabled and working properly. 

Don’t:

  • Re-direct to webpages that cannot have the Postalytics tracking code added.

  • Use a starting web URL and conversion web URL on different websites.

  • Forget to test that the tracking code is properly placed by validating the web URL in the Tracking Code section on the Integrations page in your Postalytics account.

Where can I find the Postalytics Tracking Code?

You can find (and copy) the Postalytics Tracking Code in the Postalytics app in 2 places:

  1. From the "Connect" page in the drop down under your user name

  2. Your Campaign Dashboards (after the campaign is fully processed and setup - about 15 minutes after you schedule a Smart Send or finish setting up a Triggered Drip).

What is the Postalytics Tracking Code?

The tracking code is a little bit of Javascript code, that works much like the Javascript that other advertising tracking tools use.


<script type="text/javascript">

var a;

var rc = new RegExp('_bn_d=([^;]+)');

var rq = new RegExp('_bn_d=([^&#]*)', 'i');

var aq = rq.exec(window.location.href);

if (aq != null) a=aq;

else var ac = rc.exec(document.cookie);

if (ac != null) a=ac;

if (a != null) {

 var _bn_d = a[1]; 

 (function() {

    var pl = document.createElement('script'); pl.type = 'text/javascript'; pl.async = true;

    pl.src = ('https:' == document.location.protocol ? 'https://app' : 'http://app') + '.postaladmin.com/plDataEmbed.js';

    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pl, s);

 })();

}

</script>



When you add this tracking snippet to your website, you send a pageview for each page your user visits to our servers. We process this data and can infer a great deal of information including:

  • Who is actually on your site

  • How many pages they visited

  • Which unique pages they visited

  • What conversion, or goal pages(s) did they get to

  • What links they clicked on

  • The page flow from page to page

  • By page who visited

tracking code - online response dashboard

 

DOWNLOAD TRACKING CODE QUICK REFERENCE GUIDE

Adding The Tracking Code To Your HTML

The tracking code should be added into the HTML of your page before the closing </body> tag. On a static website, this code will need to go on every page (that you want tracked and personalized). For content management and ecommerce driven sites, this can typically be placed in a single theme or template file that generates the footer.

We have tested successfully with both page and global settings with HubSpot, Unbounce & WordPress pages, with tools such as Google Tag Manager and plugins like IntellyWP Tracking Code Pro.


Add The Tracking Code To Google Tag Manager

It is easy to set up the Postalytics Tracking Code in Google Tag Manager. Simply create a new tag using the "Custom HTML" Tag Type and paste the tracking code in. Then, set the triggering to fire the tag on all of the pages that you want to to have Postalytics tracking on:

How To Test The Tracking Code

The validation tool on the Integration page will test that the tracking code is properly installed on your website. Simply type or copy/paste your "Starting URL" landing page (or other pages you want to track with the Tracking Code) and then click "Validate".

This validation tool is also within the Campaign Wizard for both Smart Send and Triggered Drip Campaigns.

How it Works

When your customers visit a personal URL (pURL) printed on your direct mail piece, they will hit our server briefly. We track the hit and then send them on to your website with their unique identifier in the query string.

The first time in, a cookie is written that contains just the unique id of the visitor. Assuming the tracking code is loaded on your main ecommerce template, all pages Joe visits on your-lawncare-ecommerce.com will be tracked and can be personalized.

Each page load that has the tracking code and detects an Postalytics ID will communicate back to Postalytics with that ID. Postalytics uses that ID along with browser info to track the activity and conversions, or goal URLs identified in the campaign.

In addition, Postalytics will send back a data object containing info that can be used on your pages for personalization. Our unique variable data and logic tools let you use data from your Postalytics campaign data file to drive personalized online experiences. (Only visitors that have cookies from visiting their PURLs).

Adding The Tracking Code Into Unbounce Landing Pages

After you've copied the Tracking Code into your clipboard, go into the editor of your Unbounce Landing page and click on Javascripts at the bottom of the editor screen:

Unbounce Editor - Postalytics Tracking Code

  • In the Javascripts popup click on + Add New Javascript and a new window will appear

  • Complete the Script Name with a name that is easily identifiable

  • Select Before Body End Tag for the Placement selection

  • Paste the Audience tracking code

Paste Tracking Code