# Memberstack.com

## Requirements

* [Memberstack](https://www.memberstack.com/) account
* InteraxAI Widget

## How it works

Memberstack allows code injection into your website based on your user's subscription plan by adding an `data-ms-content` attribute to any HTML element. This empowers your subscribed users with exclusive access to your InteraxAI widget, ensuring a personalized and enhanced experience, while your regular users remain unaffected.

## Instructions

### Add Memberstack to your no-code website

To add Memberstack to your website, you need to copy the code snippet provided by Memberstack and paste it into the `<head>` section of your website. You can find the code snippet by going to the "Settings" page of your Memberstack account and clicking the "Install Code" tab.

### Enable modal popup on your InteraxAI widget

You can enable and configure the generation limit modal popup by navigating to your widget's configuration page and then going to the [Leads](https://docs.interaxai.com/getting-started/configuring-a-widget#leads) tab.

When enabled, you will see an input for "Whitelisted `data-ms-content` IDs". The ID you put here should be the same ID you configured on your MemberStack.

### Bypassing the popup for your subscribed users

You can bypass the popup by adding a `data-ms-content` attribute to your InteraxAI script code. See the following example:

<pre class="language-html"><code class="lang-html">&#x3C;script id="interaxai-widget-config" data-ms-content="<a data-footnote-ref href="#user-content-fn-1">&#x3C;content id></a>">
  window.INTERAX_AI = {
    id: "&#x3C;Your Widget ID>",
    theme: "light",
  };
  const _interaxAI=async()=>{const t=await fetch(`https://interaxai.com
  /api/embed/version?widgetId=${INTERAX_AI.id}`).then((t=>t.text())),
  e=document.createElement("script");e.id="inteinteraxai-widget-script",
  e.src=`https://cdn.jsdelivr.net/gh/interaxai/cdn@${t}/dist/bundle.js`,
  document.head.appendChild(e)};_interaxAI();
&#x3C;/script>
&#x3C;div id="interaxai-widget">&#x3C;/div>
</code></pre>

[^1]: Change `<content id>` to the ID you configured with Memberstack. [Click for more details.](https://www.memberstack.com/data-attributes)
