In most cases you will need to add some additional JavaScript code to your current social implementation to allow BlueConic to listen to events like 'Facebook like' or 'Twitter tweet' on your website. Once you do that though you will be able to use these Social Events in BlueConic Listeners.
Some listener types allow you to create 'Social Event' rules, which will add, set, or merge the value of a profile property or update scoring models if an event in the specified social media is detected. Standard supported events are:
- Facebook Like / Unlike
- LinkedIn Share
- Twitter Follow / Tweet
Each of these social events require a specific social implementation. See below for the preferred implementation per social channel.
If you are using a social container like Gigya or AddThis then you can find details on how to integrate in separate articles. How to integrate with the AddThis social container is described here. Integrating with Gigya's social container is described here.
Additionally, BlueConic offers a JavaScript Event API, which you can use to publish any (custom) event to BlueConic.
Facebook Like / Unlike
Listening to Likes and Unlikes will, in most cases, work without additional code if the buttons have been implementated on your site using the 'HTML5' or 'XFBML' variant of the like button plugin.
If this is not the case, then see the example below for the preferred implementation.
window.fbAsyncInit =function(){ FB.init({ appId :'sensored-app-id', status :true,// check login status cookie :true,// enable cookies to allow the server to access the session xfbml :true// parse XFBML
window.blueConicClient.event.publish('facebook like',[response])
});
// Subscribe to the Like event FB.Event.subscribe('edge.create',function(response){
;
});window.blueConicClient.event.publish('facebook unlike',[response])
// Subscribe to the UnLike event FB.Event.subscribe('edge.remove',function(response){
;
});
};
(function(){
var e = document.createElement('script');
e.src = document.location.protocol +'//connect.facebook.net/fi_FI/all.js';
e.async =true;
document.getElementById('fb-root').appendChild(e);
}());
Twitter Follow / Tweet
If your implementation is based on 'Twitter for Websites' JavaScript, then in most cases you will not have to add additional code to be able to listen to Follow and Tweet events in BlueConic.
LinkedIn Share
Will always require additional code.
<script type="text/javascript">
window.bcLinkedInCallBack = function(response) {
window.blueConicClient.event.publish('linkedin share',[response.href])
}
</script>
<script type="IN/Share" data-url="..." data-counter="right"
data-onSuccess="bcLinkedInCallBack"></script>
Privacy management
Listeners can be added to Objectives, allowing for privacy management of the information that is being picked up. The listener will only update a profile if the visitor consented to at least one of the objectives that it is linked to.