Also Read: Salespanel web tracking and GDPR compliance
In the digital age, privacy is a priority. Salespanel is committed to aiding businesses in safeguarding the personal data of their website visitors while aligning with the stringent regulations outlined by the GDPR. To this end, integrating Salespanel with the comprehensive cookie and consent management solution offered by iubenda provides an optimal route to GDPR adherence.
Leveraging iubenda’s sophisticated callback functions allows Salespanel users to manage cookie permissions efficiently, and it ensures a seamless browsing experience for website visitors. Below we delve into the iubenda callbacks and offer sample codes to facilitate an effortless integration with Salespanel.
Understanding iubenda Callback Functions
iubenda provides a range of callback functions to help you manage user consent regarding cookie usage. These functions trigger different actions based on the user's interactions with the consent banner and their preferences. Here we break down each callback function and how they can be utilized:
- onReady: Invoked when the iubenda Privacy Controls and Cookie Solution is initialized or when the cookie banner is displayed for first-time visitors. It receives a boolean argument indicating the consent status.
- onBannerShown: Triggers a script when the consent banner is displayed.
- onBannerClosed: Activates a script when the consent banner is closed.
- onCookiePolicyShown: Called when the cookie policy is displayed either in a modal window or a separate page.
- onConsentGiven: Called whenever a user consents to cookie installation, including first-time and subsequent visits.
- onConsentFirstGiven: Invoked when a user gives consent for the first time or updates their preferences. It receives a string argument that details the action that led to consent.
- onConsentRejected: Called when a user rejects cookie installation.
- onConsentFirstRejected: Activated when a user rejects cookie installation for the first time or updates their preferences to rejection.
See code examples: https://www.iubenda.com/en/help/1205-how-to-configure-your-cookie-solution-advanced-guide#development
Sample Codes for Integrating Salespanel with iubenda
Update the “track by default” setting in the web tracking code
Salespanel tracks all the visitors coming to your website by default. This setting is handled by sp_track_by_default which has a default value set to true. You will have to change this setting by adding the following code after the web tracking code:
<script type="text/javascript">
window.salespanelSettings = {
"sp_track_by_default": false
};
</script>
Activate tracking when the visitor provides explicit consent
As soon as the visitor provides their consent i.e. they click on the “Agree” button, you can activate the web tracking for that visitor. For this, you will need to trigger a JavaScript function:
$salespanel.push(["set", "tracking:allowTracking"]);
Once activated, Salespanel will track this visitor on all webpages and across sessions utilizing iubenda's callback functions. Here, we provide sample codes that demonstrate how to integrate Salespanel tracking with iubenda callbacks:
// iubenda onConsentGiven callback
// ibuneda is thecallback {}
(object) in configuration – This is the parameter through which you can define the callback that iubenda Privacy Controls and Cookie Solution can perform upon the occurrence of an event.
iubenda.onConsentGiven(function() {
$salespanel.push(["set", "tracking:allowTracking"]);
});
In the above sample:
- In the
onConsentGiven
callback, Salespanel tracking is activated when the user consents to cookie installation. -
Note: The callback parameter needs to be included within
_iub.csConfiguration {}
.
We hope the information was useful!