You can use the JavaScript tracking client to track any application that supports JavaScript: for example, websites!
To find the tracking code for your website, follow the steps below:
- log in to Factoreal with your admin account
- click on the “settings” (cog icon) in the bottom left menu
- click on “Website” menu under “Integrations” tab
- click on “Copy Script” for the website you wish to track.
- Paste the JavaScript tracking code into your pages, just after the opening <body> tag (or within the <head> section)
The tracking code looks as follows:
<!– Factoreal –>
<script> var _paq = window._paq = window._paq || [];
/* tracker methods like “setCustomDimension” should be called before “trackPageView” */
_paq.push([“setCookieDomain”, “*.store.combifam.com”]);
_paq.push([“setDoNotTrack”, true]);
_paq.push([‘trackPageView’]);
_paq.push([‘enableLinkTracking’]);
(function () {
var u = “https://webanalytics.factoreal.com/”;
_paq.push([‘setTrackerUrl’, u + ‘js/tracker.php’]);
_paq.push([‘setSiteId’, ’60’]);
var d = document, g = d.createElement(‘script’), s = d.getElementsByTagName(‘script’)[0];
g.async = true;
g.src = u + ‘js/tracker.php’;
s.parentNode.insertBefore(g, s);
})();
</script>
<noscript>
<p><img src=”https://webanalytics.factoreal.com/js/tracker.php?idsite=60&rec=1″ style=”border:0;” alt=”” /></p>
</noscript> <!– End Factoreal Code –>
This code might look a bit strange to those of you familiar with JavaScript, but that is because it is made to run asynchronously. In other words, browsers will not wait for the js/tracker.php file to be downloaded to show your page.
Note: Please look at how to Enable User ID Tracking for JavaScript Client for better tracking.