Articles on: Percs (Percs.app)

How to collect subscribers on XMTP & Push

How to Add Wallet Messaging Integration for Wallet-2-Wallet Messaging campaigns




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="https://assets.getpercs.com/sdk/percs.js"></script> <script type="text/javascript">
  // Must initialize with at least the clientKey before using the library or components
  window.PERCS.init({
    clientKey: "Add your API key from settings here",
    apiHost: "https://api.getpercs.com",
  })
</script>

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() {
  window.PERCS.openModal({
    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!",
    }
  });
});

</script>
<percs-modal/>


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: 13/08/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!