Website Visitor Tracking
The Paminga tracking beacon is very similar to the Google Analytics tracking beacon in both functionality and implementation. Both are small snippets of javascript that call a larger bit of javascript. This larger bit of javascript does all the work.
At a high level, the Paminga tracking beacon…
- Creates a Paminga “Contact” for each visitor that arrives at your website
- This Contact initially lacks a first name, the last name, an email address and all other personally-identifying information. This is known as an “Anonymous Contact”
- Creates a “Visit” in Paminga for that Contact. It stores the source of the website visit as well as duration and number of web pages viewed during the visit
- Makes a record of each page view in that Visit such that you are able to see exactly which pages were viewed by any Contact during any Visit
- Makes a record of whether your Contact viewed any YouTube, Wistia, or Vimeo videos that you have embedded on your website, as well as the percentage of the video that was watched
- Makes a record of any PDF documents that the visitor may have clicked on while visiting your website
- Aids in the display of any Paminga Forms that you may choose to build within Paminga and then embed the pages of your website
How does the Tracking Beacon work?
The Paminga tracking beacon issues a unique ID to each visitor. This unique ID is stored in a “1st party cookie”.
A cookie is a bit of text that web browsers like Google Chrome can store. Despite common misperceptions, cookies cannot discover your email address or other identifying information. A cookie is nothing more than a tiny text file. It has no special powers. In this case, we simply store the unique ID in this text file.
Being a 1st party cookie means that the Paminga tracking beacon makes no attempt to monitor your website visitors once they have left your website. This is something that 3rd party cookies do. Paminga does not utilize 3rd party cookies.
Whenever a page is viewed on your website, the Paminga tracking beacon retrieves the unique ID from the cookie. It then sends data to our servers to be stored. The data sent to Paminga in this process includes…
- the visitor’s unique ID
- the URL of the page that was visited
- the date and time at which the page view occurred
- the URL of the web page that led the visitor to the current page
- the IP address reported by the visitor’s web browser
Each of these page views is now associated with the unique ID assigned to that visitor and to the Contact record that now exists in Paminga. This is the mechanism that allows Paminga to show you each visitor to your website, how they arrived at your website, and which web pages were viewed by that visitor and for how long.
Paminga uses the IP address to discover the city, state/province, and country where your website visitor is located. It can sometimes tell us the name of the company where the visitor works.
If a website visitor, at some point during their visit or during any subsequent visit, submits a Paminga Form embedded on your website, Paminga will record the form submission (allowing you to trigger many automated actions) and update the Contact record for that visitor. Depending on the fields that your form requires, your Contact’s first name, last name, and email address may be populated, for example. The Contact is no longer an “Anonymous Contact” but an “Identified Contact”.
Privacy Implications
The vast majority of your website visitors will not submit a form on your website and will therefore remain anonymous and unidentified.
For those visitors who choose to submit a form, we recommend that you publish and update a privacy policy as needed in which you use plain language to disclose the data gathered and how that data will be used.
Hundreds of thousands of companies utilize technology similar to the Paminga Tracking Beacon. In our experience, it’s commonly accepted businesses gather data on the usage of their website to improve marketing and communication efforts.
Implementing the Tracking Beacon
This snippet of code is a small block of javascript that needs inserted into the standard or “included” footer in your website. Companies with 2,000+ web pages have implemented this code in literally 5 minutes!
Where to Find the Code
- Login to your Paminga account.
- Navigate to your “Account Settings” page in Paminga. You can find the “Account Settings” page by clicking on your user icon in the upper right-hand corner of Paminga
- Upon selection go to "Account Setup" on the left-hand side of the app, and expand the option "Track Your Website Visitors". Once expanded, you will be presented with your specific Tracking Code for your account, along with detailed instructions for implementation
- When you hover your mouse over the implementation code, a small “copy” button will appear in the upper right-hand corner. Click the button to copy your code.
Where to Put the Code
- The line of javascript must be placed within the <body> of each page. If your page employs a standard (or included) footer that’s part of each page (which is super common!), the code can be placed just once into that included footer. Because the footer is part of every page of your website, your implementation code is completed in minutes
- The ideal location to place the code is immediately above the </body> tag at the end of the page, though this is not a requirement
How to Add the Tracking Code using Google Tag Manager
Follow these steps to add the Paminga tracking code (tag) to your Google Tag Manager account.
- Login to your Google Tag Manager account
- Access your workspace and click on Add A New Tag. This is a tile on your workspace in the upper left. Or if you’re viewing your tags you can click on the red New button to add the tag
- Name your tag by clicking in the top bar where it says Untitled Tag (recommended that you add Paminga in the name for identification)
- Click in the Tag Configuration section
- Choose the Custom HTML tag
- Paste your Paminga tracking code directly into the HTML box
- Check the box for Support document.write.
- Under the Advanced Settings change the Tag Firing Options to Once per Page
- Navigate down to the Triggering section and click on the section to add a Trigger
You must add a trigger for the Paminga tracking code to fire on your website.
- Click the icon in the upper right to create a new trigger
- Give your trigger a name by clicking in the top box where it says Untitled Trigger (recommended that you include Paminga somewhere in your name, e.g. Paminga Code Trigger, etc.)
- Click in the Trigger Configuration box to add the trigger
- Pick the Trigger Type of Page View
- Under the Trigger Configurations choose for the trigger to fire on All Page Views
- Save your tag and trigger by clicking on the blue Save button in the top-right (this should take you back to your workspace)
- Publish your new tag and trigger by clicking on the red Publish button in the upper-right of your workspace
Technical Details
The Paminga tracking beacon that you add to your website simply loads a larger bit of JavaScript from Amazon's CloudFront content delivery network. The beacon determines whether your page was loaded via http or https, and then loads a file called capture.js from the CDN via the protocol that was used by your website visitors to load your page.
Detecting Whether the Tracking Beacon is Loading
When the capture.js file finishes loading, a javascript object named __MA will be present on the page. You may test for its presence like this:
if (window.$__MA !== undefined) { … }
Getting the mauuid (Paminga Unique Visitor ID)
The $__MA javascript object exposes several methods. One of these methods enables you to retrieve the mauuid which may be the starting point of various API operations.
const mauuId = ($__MA.getVisitorId().v);
A Note of Caution on Timing in Javascript
Javascript does not guarantee that any object will load in a certain order or within a given amount of time. The loading of the Paminga Tracking Beacon is subject to DNS lookups, connection latency, the variable nature of the devices loading it (phones, laptops, desktops), the amount and nature of other javascript that may be loading or executing simultaneously…
As such, if writing code that depends on the Paminga mauuid being present, it is a best practice to leverage javascript’s setInterval() method to “wait” until the $__MA object has finished loading before attempting to perform any operations that depend on its presence…
<script>
let i = 0;
const id = setInterval(function () {
if (window.$__MA !== undefined) {
clearInterval(id);
const mauuId = ($__MA.getVisitorId().v);
});
} else {
i++;
}
if (i === 10) {
clearInterval(id);
console.log('no mauuid, bailing');
}
}, 30)
</script>
Leveraging the Paminga API
When you have the mauuid for a visitor, you may use it to retrieve the Paminga unique contact_id associated with that visitor via the Contact::getContactIdByMauuid() API method.
The Paminga contact_id is the key to retrieving data via the Paminga API.
Note that any Paminga Contact may be associated with more than one mauuid as any given mauuid is specific to a particular device and browser, given that they are stored in 1st party cookies.
Ad Blockers and Their Impact
Some ad blockers may prevent the proper loading and execution of the tracking beacon. This can result in some “artifacts” appearing in various parts of the platform.
To be clear, Paminga has no involvement with ad networks and their ads. We have no relationships with these companies. Paminga transmits no data to them, nor receives data from them.
Website Visits and Page Views
When the tracking beacon is unable to load, Paminga is prevented from tracking web page views. For visitors using certain ad blockers, Paminga is unable to create a Contact record or record website visits and their page views.
An exception is PDF downloads. Since these assets are hosted directly by Paminga, we are able to track PDF downloads for these visitors.
Form Submission Notifications
Ad blockers do not prevent the loading or submission of any Paminga Forms you may have embedded in the pages of your website, but they can result in some “odd” looking data.
If an ad blocker prevents the tracking beacon from operating, Paminga cannot record a website visit or the page views that occur during that visit.
In the Activity Stream for that Contact, you will see a form submission but no associated website visit, which can be confusing.
If your website visitor submits a Paminga Form during an untracked visit, the form submission notification, which normally provides details of both the “First Visit” and “This Visit” will display “N/A” (Not Applicable) where the visit details would normally appear.
Email Opens and Clicks
Ad blockers do not prevent Paminga from tracking email opens and clicks. This is because the Paminga Tracking Beacon is not involved in capturing email open and click activity. These activities are captured via another mechanism.
In the Activity Stream for such Contacts, you may see that your email was opened or clicked with no subsequent website visit.