Mautic Community Forums

Lead tracking from other websites

Hello,



I configure correct the gif for lead tracking, through javascript script. And I receive anonymous leads from other sites, not only from my site. I use google cloud platform, this could be the problem? and how can we fix it?



Thanks

Hello,

I configure correct the gif for lead tracking, through javascript script. And I receive anonymous leads from other sites, not only from my site. I use google cloud platform, this could be the problem? and how can we fix it?

Thanks

You’d have to describe your situation in more detail. For example why do you use a javascript for tracking? How does the script look like? What is your website URL? What URL do the unwanted leads have?

Yes for sure! I use the javascript script for the simplicity of configuration. I make some changes in it, for manage UTM tags properly.

<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 SITE URL HERE}}'; 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>

I have other mautic installation, for other client, with same and works well. And its the same VPS configuration through BITNAMI google cloud instance.

As you can see in the screenshots, all monitorized chinese traffic comes from google.com hong kong. Obiously, my site isn’t google hong kong…

Screenshot 1

Screenshot2

Looks OK. No idea where the google URL tracking could came from. Maybe if you’d try to use the plain img tag for a while to make sure this script is not causing it.

It’s confusing because other clients doesn’t cause problems. Anyway, Its not important. I get less than the first day. Probably dissapears soon.