SendPulse's Facebook Messenger integration allows you to transfer {{phone}}
and {{email}}
variables to a SendPulse account during a subscription to a Facebook chatbot.
Using this method, you can pass variables for Telegram, VKontakte and Facebook chatbots.
You can set up the transfer of variables with 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.
Please note: if you added a method for passing additional variables for web push notification subscribers using window.oSpP
, there may be conflicts with the widget for collecting additional variables for the chatbot, and widget may not work.
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.
Last Updated: 22.02.2021
Sign up with
Sign in with Facebook Sign in with Google