Articles on: Marketing Hub

How to collect subscribers

Start by adding the following code snippet anywhere on your page. Make sure you add your API key from the settings page on your admin panel.

<script type="text/javascript" src=""></script> <script type="text/javascript">
  // Must initialize with at least the clientKey before using the library or components
    clientKey: "Add your API key from settings here",
    apiHost: "",

Next copy and paste the following code snippet where you want to collect subscribers. Note: this will automatically trigger when your page loads.

<script type="text/javascript">
window.addEventListener("load", function() {
    subscribe: {
      providers: ["xmtp_messaging"],
      required: true,
      headingImage: {
        src: "Add your image header url here",
      headingText: "Subscribe to our updates!",
      successHeadingText: "Thanks for signing up!",
      successDescriptionText: "Be on the lookout for new product drops and exclusive offers in your inbox!",
    gate: {
      description: "Get exclusive offers sent straight to your inbox!",


headingImage - Image url that will be displayed on your pop-up.

headingText - Large text that will be displayed on your pop-up.

description - The subtext that is displayed on your pop-up.

Updated on: 10/04/2024

Was this article helpful?

Share your feedback


Thank you!