Salespanel website SDK provides you a flexible and customizable workflow if you want to connect your custom lead forms or wizards with Salespanel lead identification framework.
So by default Salespanel website SDK tracks leads automatically on HTML5 based webforms. Whenever a visitor engages with the webform and we detect an email address we connect the anonymous visitor's session with this email address and consider it as an identified lead. We activate all kinds of workflow related to this identified lead after that. For example:
- Syncing this lead as a CRM contact/lead.
- Sending their real-time web visit activity to the relevant CRM contact/lead detail page.
- Updating their lead score in real-time.
- Activating triggers in relevant Salespanel Segments.
- Sending lead alerts to lead owners whenever this lead re-visits or qualifies for any Salespanel Segment.
Once identified, you can look at historical web page activities by this lead and get an intuitive sense of what they are looking for. So you can use this data with your workflow and it all starts with connecting this lead's session with Salespanel data platform. The above example workflows also provide us a picture of why we provide an out of the box configurable webform tracking.
In order to open up more opportunities and what's possible with this workflow, we provide a website side ( client-side ) Javascript method which can act as a data source and send us the email information of the anonymous visitor.
If that sounds like too much information, let's get into it step by step:
- The client-side Javascript method means an actionable piece of Javascript code that can be triggered in your visitor's browser when one is live on your website. It's a part of the Salespanel tracking code but it can be executed on demand. For example when a form is submitted or a button is clicked.
- Your website acts as a data source means that the visitor was an anonymous visitor up until this point. When the lead interacted with a custom lead form, you used this Javascript method to send the 'email' of the visitor to your Salespanel lead database, and therefore we identified the lead.
So let's have a look at this Javascript method from Salespanel's website SDK:
$salespanel.push(["set", "identify:email", `email`, `source`]);
Let's look at the parameters you can use with this Javascript method:
The email of the visitor | |
source | Any string of your choice that represents the identification source. Some examples would be 'Drift', 'SpecialWebForm', 'Custom web form'. |
Let's look at an example problem statement. So the requirement is whenever the support chat's lead form is filled up by the visitor we want to identify the visitor with Salespanel. So the code would look something like this:
<script type="text/javascript">
try{
olark('api.visitor.getDetails', function(details){
// Check for an email address
if (details.emailAddress) {
$salespanel.push(["set", "identify:email", details.emailAddress, 'olark'])
}
});
}catch(e){
console.log('sp:error: Olark get details failed');
}
</script>
The same is explained in detail here
So how does the identified lead looks like at Salespanel's dashboard when you trigger this call:
You can notice an identified through attribute on the lead detail page that's automatically available now. That shows you that this lead was identified by using this Javascript method provided by Salespanel's website SDK.
This workflow is very useful when you are working with third party contact form providers. These vendors provide events that can have a Javascript callback function and inside this callback function, you can use the above discussed Salespanel's identification method. Most of the time these events are triggered before these libraries submit the webforms.
Please let us know if you need more assistance with this.