Google Tag Manager

Installing Saltfish: Google tag Manager

Install Saltfish

  1. Sign into your Google Tag Manager account.

  2. Go to Tags.

  3. Click New.

  4. Click Tag Configuration.

  5. Click Custom HTML.

  6. In the HTML field, paste the code below (make sure to replace 'YOUR_UNIQUE_API_TOKEN' with your unique API token: https://studio.saltfish.ai/settings

  7. Click Triggering.

  8. Choose 'Initialization', or another more suitable trigger if you have one.

  9. Click Save and give the tag a name, such as “Saltfish initialization”.

  10. Submit your latest changes in Google Tag Manager ensure they are pushed live to your site

<script>
(function () {
  if (window.saltfishHasInit) return;
  window.saltfishHasInit = true;

  var script = document.createElement("script");
  script.src = "https://storage.saltfish.ai/player/player.js";
  script.async = true;
  script.onload = function () {
    if (window.saltfish) {
      window.saltfish.init({ token: "YOUR_UNIQUE_API_TOKEN" });
      console.log("[Saltfish] Initialized");
      window.saltfish.identifyAnonymous();
    }
  };
  document.head.appendChild(script);
})();
</script>

Last updated