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.
![](https://storage.crisp.chat/users/helpdesk/website/2d173a8eaad04e00/32bbcfeb40b5a635a98965bd44fa11_khthkh.png)
Updated on: 13/08/2024
Thank you!