How does automatic GDPR plugin integration work in Smash Balloon’s plugins?
Smash Balloon’s plugins include an automatic integration with several popular supported GDPR cookie plugins to show a GDPR-limited version of the feed until a visitor to your site accepts the GDPR cookie notice. You can see more information on how this works and a list of compatible plugins here:
Facebook
Instagram
Twitter
YouTube
What can you do if you are using an unsupported GDPR cookie plugin?
If you are using a GDPR cookie plugin that does not have an automatic integration with our plugins, but it has a setting to execute custom JavaScript code after the GDPR cookie notice has been accepted by a visitor to your site, you can set up an integration with the steps below.
1) Depending on which of our plugins you using, go to WordPress Dashboard > Facebook Feed / Instagram Feed / Twitter Feed / YouTube Feed > Settings > Feed, set GDPR to Yes, and click Save Changes. This will set the plugin to show the GDPR-safe version of the feed until the custom JavaScript is executed.
2) Go to the settings for your GDPR plugin and find the area for adding custom JavaScript to execute when the cookie notice has been accepted. This may be in an “Advanced” area and you can also check in the documentation or contact the support for your GDPR plugin to see if this feature is available and where it is located. The setting may be labeled something like this: “jQuery/Javascript Code to Run If Approved/Accepted.”
3) Find the JavaScript code snippet below for the Smash Balloon plugin you are using, copy and paste this into the custom JavaScript setting for your GDPR plugin, and save the settings.
jQuery.each(window.cff.feeds,function(index){
window.cff.feeds[ index ].settings.consentGiven = true;
window.cff.feeds[ index ].afterConsentToggled();
});
jQuery.each(window.sbi.feeds,function(index){
window.sbi.feeds[ index ].settings.consentGiven = true;
window.sbi.feeds[ index ].afterConsentToggled();
});
jQuery.each(window.ctf.feeds,function(index){
window.ctf.feeds[ index ].settings.consentGiven = true;
window.ctf.feeds[ index ].afterConsentToggled();
});
YouTube
jQuery.each(window.sby.feeds,function(index){
window.sby.feeds[ index ].settings.consentGiven = true;
window.sby.feeds[ index ].afterConsentToggled();
});
If your GDPR plugin also has a setting to add JavaScript code to run if the cookie notice is rejected, you can leave this empty.
Now your site will show a GDPR limited version of your feed until a visitor accepts the cookie notice.