The Mobi Developer Hub

Welcome to the Mobi developer hub. You'll find comprehensive guides and documentation to help you start working with Mobi as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Google Tag Manager

Integrate web Instabot using Google Tag Manager

📘

Don't have an Instabot account yet?

Start your free trial today!

Overview

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


Contents

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

🚧

Prerequisites

  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", "https://widget.instabot.io/jsapi/rokoInstabot.js"); </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

📘

IMPORTANT

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

Publish

Updated 26 days ago

Google Tag Manager


Integrate web Instabot using Google Tag Manager

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.