Some websites and web pages are built such that it may be useful to track different sections on a single page as separate “page views”.
This is possible with Net-Results. Here is what is required:
- Ensure that the Net-Results Tracking Beacon is loaded on the site/page in question
Once you’ve added the Net-Results Tracking Beacon to your website, it continually tracks every page view made by every visitor to your site (with the exception of visitors using certain ad blockers that interfere with marketing tracking beacons). The Tracking Beacon does this by sending data about each page view back to our servers.
The URL of each page viewed is simply text – something like “www.yoursite.com/contact”. Net-Results records these page views and organizes them into “visits”. Page views and visits stream continually into the Net-Results platform from websites around the world.
If you have a web page divided into discrete sections and you would like to track each of those sections as if it were a separate page view, it’s quite simple:
Call the $__MA.doCapture() function passing 3 parameters:
- The full URL of the “page” you would like tracked
- The “referring URL”. You may choose to pass the URL of the site itself
- Your Net-Results “Product ID” which can be found in the upper right area of the My Account page in Net-Results
When setting this up, you can do so dynamically or static, or any combination of the two
Let’s say you have a single web page with sections for “About”, “Pricing” and “Contact”, and that you’d like to record a page view in Net-Results each time one of these sections is viewed.
Here is how to record a static “page view” for the Pricing section:
$__MA.doCapture(‘www.yourSite.com/Pricing, ‘’www.yourSite.com’, X);
(X represents your Net-Results Product ID).
Making this a bit more dynamic it may look something like this:
const productId = X;
const sectionName = Y;
$__MA.doCapture(document.location + sectionName, document.referrer, productId);
var sectionName = "/mySection"; $__MA.doCapture(document.location + sectionName, document.referrer, document.getElementById('__maSrc').getAttribute('data-pid'));
Importantly, Net-Results makes no attempt to validate that a particular URL actually exists. This means you may pass data on “page views” for web pages that do not exist: simply send a unique URL to Net-Results for each distinct section on your web page.