The Problem
There’s no data displaying in Mautic despite adding a tracking pixel to a site.
What I’ve Done
I’ve setup an install of Mautic on my InMotion Hosting server.
I’ve added the following JS script to the footer of this site: shoeshinedesign.com
What I expect to see
Some sort of data in Mautic saying someone has visited the site. Or am I not understanding something?
The Problem
There’s no data displaying in Mautic despite adding a tracking pixel to a site.
What I’ve Done
I’ve setup an install of Mautic on my InMotion Hosting server.
I’ve added the following JS script to the footer of this site: shoeshinedesign.com
<script>
// Extract UTMs from URL
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
var utm_source = getUrlVars()["utm_source"];
var utm_medium = getUrlVars()["utm_medium"];
var utm_campaign = getUrlVars()["utm_campaign"];
// Conditions for create right URL
if (typeof(utm_source) == "undefined") {
utm_source = ""
}
else {
utm_source = "&utm_source=" + utm_source
}
if (typeof(utm_campaign) == "undefined") {
utm_campaign = ""
}
else {
utm_campaign = "&utm_campaign=" + utm_campaign
}
if (typeof(utm_medium) == "undefined") {
utm_medium = ""
}
else {
utm_medium = "&utm_medium=" + utm_medium
}
// Mautic Lead tracking GIF
var mauticUrl = '//mautic.shoeshinedesign.com';
var src = mauticUrl + '/mtracking.gif?page_url=' + encodeURIComponent(window.location.href) + '&page_title=' + encodeURIComponent(document.title) + utm_source + utm_medium + utm_campaign;
var img = document.createElement('img');
img.style.width = '1px';
img.style.height = '1px';
img.style.display = 'none';
img.src = src;
var body = document.getElementsByTagName('body')[0];
body.appendChild(img);
</script>
What I expect to see
Some sort of data in Mautic saying someone has visited the site. Or am I not understanding something?