There is a 2-step process to add Hark to your website:

  1. Add Hark script to all site pages using Google Tag Manager
  2. Link Hark script to your Contact button

How to add Hark snippet script

  1. Log in to Google Tag Manager. Click Add a New Tag.**

1-GoogleTagManager-AddNewTag.png

  1. Give the tag a title at the top left.
  2. Click anywhere in the Tag Configuration section.

2-GoogleTagManager-ChooseTagType.png

  1. Click Custom HTML under Custom.

3-GoogleTagManager-SelectCustomHTML.png

  1. Paste the Hark script into the HTML box.

    1. Your Hark Script:

    <!-- Start of Hark Script --> <script type="text/javascript"> var harkScript = document.createElement("script"); harkScript.src = "<https://storage.googleapis.com/prod_harks/sendhark_handler.js?randomstr=>" + Date.now(); document.body.appendChild(harkScript); harkScript.onload = function () { harkEmbedJs.init("Client ID here", "popup", "hark_button"); }; </script> <!-- Script End -->

    b. “Hark_button” can be replaced with any ID you choose, it just has to match the ID of the button or div on the page where you want Hark to load.

  2. You will need to choose a trigger at the bottom to make the tag fire. Click the pencil icon in the Triggering section.

  3. Choose the trigger, All Pages - Page View.

  4. Once you have chosen a trigger, click Save in the top right.

4-GoogleTagManager-PasteScriptSelectTrigger.png

  1. Now the Hark script is present on your site. This enables you to have Hark load when a button is clicked and/or enable the floating Hark icon.