3

We've added this code exactly as provide on Marketing Cloud to Google Tag Manager and set it to run on every page view. However, only about 10% of visits are being tracked. I've replaced our OrgId with XXXX in the example below...

<script type="text/javascript" src="http://XXXX.collect.igodigital.com/collect.js"></script>
<script type="text/javascript">
_etmc.push(["setOrgId", "XXXX"]);
_etmc.push(["trackPageView"]);
</script>
3
  • what site you need track ?
    – Ravi.A
    Commented May 22, 2019 at 9:33
  • 2
    @pkharries I think I have solved it. The website was running https and the default code snippet from SalesForce is http. Thankfully they host their scripts behind https as well so it was a simple change. SalesForce need to update this!
    – DanSykes
    Commented May 22, 2019 at 10:08
  • adding the s to http solved it for me as well. Commented Jul 15, 2020 at 18:04

1 Answer 1

5

Answered my own question, which is always good!

The issue is that the SalesForce code snippet is based on http which causes issues for website running https (which most sites do nowadays) and throws a mixed content error in the majority of modern browsers.

Therefore to fix the issue you need to replace the http part with https as per below... http://XXXX.collect.igodigital.com/collect.js becomes https://XXXX.collect.igodigital.com/collect.js

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .