Google Tag Manager

Integrate web Instabot using Google Tag Manager


Don't have an Instabot account yet?

Start your free trial today!


This guide will demonstrate how to integrate web Instabot into your site using Google Tag Manager.


  1. Prepare the Instabot JavaScript code
  2. Insert Instabot into your page



  1. Instabot portal account is created

  2. Instabot conversation is created

1. Prepare the Instabot JavaScript code

  1. In the JavaScript below, replace the following value with your API key:
<script type = "text/javascript" > (function(i, s, o, u, a, m) {
    a = s.createElement(o);
    a.innerHTML = 'apiKey: "/8MRPdIyb3v35RuvyoQ266b5TnBKej6NvYm53Dg795Q="';
    tags = s.getElementsByTagName(o);
    m = tags[tags.length - 1];
    a.async = 1;
    a.crossorigin = "anonymous";
    a.src = u;
    m ? m.parentNode.insertBefore(a, m) : s.body.appendChild(a);
})(window, document, "script", ""); </script>

That's it! Now we're ready to insert our Instabot JavaScript into our page via Google Tag Manager.

2. Insert Instabot into your site using Google Tag Manager



You only have to perform these steps once! Once the Instabot code is inserted into your website, you can change your Instabot's location, behavior, and content in the portal without touching any code, ever again!

  1. In Google Tag Manager, click "Add a new tag".

Add a new tag

  1. Under "Tag Configuration", select "Custom HTML"

Custom HTML tag

  1. Insert the Instabot JavaScript, then add a Google Tag Manager trigger

Insert the Instabot JavaScript

  1. Select "all pages" (or whatever is appropriate) for the GTM trigger, then click Save

Save GTM trigger

  1. Click Submit to insert your tag into your page.

Insert tag via GTM into page

  1. Finally. click Publish