Help Center

Integrating Gigya with BlueConic

Gigya allows you to specify a callback function when placing a Share Bar on your site. This callback function can be used to publish custom events to BlueConic when a visitor uses the share bar. The following example shows how:

<script type="text/javascript">
    var handleEvent = function(eventObj) {
        if (eventObj.eventName && window.blueConicClient) {
           if (eventObj.eventName == 'sendDone') {
            window.blueConicClient.event.publish('gigya-' + eventObj.providers);
        }
           if (eventObj.eventName == 'shareButtonClicked' && eventObj.shareItem) {
            window.blueConicClient.event.publish('gigya-' + eventObj.shareItem.provider);
        }
        }
    };
    var act = new gigya.socialize.UserAction();

    var showShareBarUI_params=
    {
        containerID: 'sharebarDiv',
        shareButtons: 'facebook-like,facebook,twitter-tweet,googleplus-share,share',
        userAction: act,
        hideGigyaLink:true
        ,lang:'nl',
        onSendDone: handleEvent,
        onShareButtonClicked : handleEvent
    }
    gigya.socialize.showShareBarUI(showShareBarUI_params);
</script>

This will publish an event to BlueConic using the following syntax: “gigya-<provider code>”.

After the script has been added to your website, you can configure listeners to subscribe to these events. See Using the BlueConic Event API to publish events for details on how custom events in BlueConic work.

Was this article helpful?
0 out of 0 found this helpful