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"]);
  • what site you need track ? – pkharries May 22 '19 at 9:33
  • @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 May 22 '19 at 10:08

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.