How to transfer custom variables during a subscription to a Facebook chatbot

The SendPulse with Facebook Messanger integration allows transferring {{phone}} and {{email}} variables to a SendPulse account during a subscription to a Facebook chatbot.

You can set up the transfer of variables in two methods.

Method 1

After adding the code of a Facebook chat widget, add the following code to the site:

<script type="text/javascript">
    window.oSpP = {
        phone: '+123123123',
        email: 'username@example.com'
    }
</script>

If customers subscribed to the chatbot and after that the {{phone}} and {{email}} variables were added for these customers, their data will not be transferred to the SendPulse account.

Method 2

Add additional input fields with the sp_push_custom_data class to the site:

<input type="hidden" name="email" class="sp_push_custom_data " value="username@example.com">
<input type="hidden" name="phone" class="sp_push_custom_data " value="+123123123">

Both methods are universal for sites on any CMS.

If you have already set up the transfer of variables during a subscription to web push notifications, the variables will be transferred during a subscription to a Facebook chatbot as well — no additional settings are required.

Rate this article about "How to transfer custom variables during a subscription to a Facebook chatbot"

User Rating: 4 / 5 (6)

    Other useful articles

    Popular in Our Blog

    Try a free chatbot for Facebook Messenger