Developing with Social Intents

We have a simple yet powerful Javascript API and custom CSS support that gives you broad flexibility on how your app behaves.

Give it a shot! All you need to do is ensure you have the Social Intents generated code snippet or plugin installed on your page. Once you have that, you can use any of the methods defined below.

onSIApiReady()

This callback method is used to notify your page when the Social Intents API script has finished loading. Since we load our scripts asynchronously, you can wrap your initialization logic in this method

<script type="text/javascript">
function onSIApiReady() 
{
//Will display the tab once the scripts have loaded
SI_API.showTab();
};
</script>

SI_API.setChatInfo(name,email,phone,group)

This method is used to prepopulate pre-sales chat info. For instance, if you a member site and have already collected email and name, you can pre-populate these fields on the chat. If you don't want the visitor to change them, simply disable these fields in your settings, and we'll automatically place this information in the chat.

<script type="text/javascript">
function onSIApiReady() 
{
//Will display the tab once the scripts have loaded
SI_API.setChatInfo('visitor name','email@test.com','(123) 123-1234','Marketing');
};
</script>

SI_API.showTab()

This method is used to show the Tab button on your page. For example, you can display it after a custom period of time, or after a click on a certain element on your page.

<script type="text/javascript">
function onSIApiReady() 
{
//Will display the tab once the scripts have loaded
SI_API.showTab();
};
</script>

SI_API.hideTab()

This method is used to hide the Tab button on your page.

<script type="text/javascript">
SI_API.hideTab();
</script>

SI_API.showPopup()

This method is used to display the popup on your page. Have more complex rules you want to use before showing an offer? Want to display an offer after clicking a checkout button? Here's where you can do it.

<script type="text/javascript">
SI_API.showPopup();
</script>

SI_API.hidePopup()

This method is used to hide the popup on your page. Want to automatically close the popup after a period of time, here's your method.

<script type="text/javascript">
SI_API.hidePopup();
</script>


Social Intents - Copyright 2018