Docs        Documentation

How to add support for Smash Balloon GDPR setting in unsupported GDPR plugins

The plugins integrate automatically with several popular GDPR cookie plugins. How to add support for one that is not on the list.

Would you like to show a GDPR limited feed until visitors accept your cookie notice, even if we don’t support your consent plugin?

In this guide, we’ll show you how to connect a consent plugin that has no automatic integration to the GDPR setting in our feed plugins. You’ll turn the GDPR setting on, then add a short JavaScript snippet to your consent plugin. This works for Facebook Feed Pro, Instagram Feed, Twitter Feed Pro, and YouTube Feed.

Before you get started, make sure the feed plugin you use is installed and activated on your WordPress site. Your consent plugin also needs a setting that runs custom JavaScript code after a visitor accepts the cookie notice.

Note: The Facebook and Twitter snippets work only with the paid plugins, Facebook Feed Pro and Twitter Feed Pro. If you use the free version of Facebook Feed or Twitter Feed, choose a consent plugin from our GDPR consent plugin list. Then set the GDPR setting to Automatic.

How Does the Automatic Integration Work?

Each feed plugin in this guide has a GDPR setting. When it’s on Automatic, the plugin looks for a supported consent plugin on your site. If it finds one, it shows a GDPR limited version of the feed until a visitor accepts your cookie notice.

To see how this works in each plugin, choose yours below.

To check whether your consent plugin is supported, see our GDPR consent plugin list.

Adding an Unsupported Consent Plugin

If your consent plugin has no automatic integration, you can still connect it. It needs to be able to run custom JavaScript code once a visitor accepts the cookie notice. To get started, we’ll turn the GDPR setting on and add a snippet to your consent plugin.

Turning On the GDPR Setting

First, set the GDPR setting to Yes. With Automatic, the plugin only limits the feed when it detects a supported consent plugin. With Yes, it limits the feed for every visitor until the snippet runs.

Each feed plugin keeps the setting on the Feeds tab of its Settings page.

Feed pluginSettings pageTab
Facebook FeedFacebook Feed » SettingsFeeds
Instagram FeedInstagram Feed » SettingsFeeds
Twitter FeedTwitter Feed » SettingsFeeds
YouTube FeedYouTube Feed » SettingsFeeds
  1. From your WordPress admin sidebar, go to the Settings page for your feed plugin, using the path in the table.
  2. Next, click the Feeds tab.
  3. In the GDPR box, open the dropdown and choose Yes.
  4. Then, click Save Changes.

Your feed now shows the GDPR limited version until the snippet runs.

Next, open the settings for your consent plugin and find the area that runs JavaScript code after a visitor accepts the cookie notice.

This may be in an “Advanced” area. The setting may be labeled something like “jQuery/Javascript Code to Run If Approved/Accepted.”

If you can’t find it, check the documentation for your consent plugin or contact its support team. They can tell you whether the feature is available and where to find it.

Adding the Snippet

Then, copy the snippet for your feed plugin from Choosing the Snippet for Your Feed Plugin. Next, paste it into that JavaScript setting in your consent plugin and save the settings.

Each snippet goes through every feed of that plugin on the page. For each one, it marks consent as given and tells the feed to load its full version. You don’t need a separate snippet for each feed.

If your consent plugin also has a setting to run JavaScript code when the cookie notice is rejected, you can leave it empty. With Yes, the feed already stays in its GDPR limited version until the snippet runs.

Facebook Feed Pro

Here is the snippet for Facebook Feed Pro.

jQuery.each(window.cff.feeds,function(index){
    window.cff.feeds[ index ].settings.consentGiven = true;
    window.cff.feeds[ index ].afterConsentToggled();
});

Instagram Feed

Here is the snippet for Instagram Feed.

jQuery.each(window.sbi.feeds,function(index){
    window.sbi.feeds[ index ].settings.consentGiven = true;
    window.sbi.feeds[ index ].afterConsentToggled();
});

Twitter Feed Pro

Here is the snippet for Twitter Feed Pro.

jQuery.each(window.ctf.feeds,function(index){
    window.ctf.feeds[ index ].settings.consentGiven = true;
    window.ctf.feeds[ index ].afterConsentToggled();
});

YouTube Feed

Here is the snippet for YouTube Feed.

jQuery.each(window.sby.feeds,function(index){
    window.sby.feeds[ index ].settings.consentGiven = true;
    window.sby.feeds[ index ].afterConsentToggled();
});

That’s it! Your site now shows the GDPR limited version of your feed until a visitor accepts the cookie notice. To find consent plugins that connect without a snippet, see our GDPR consent plugin list.

Frequently Asked Questions

Below, we’ve answered some of the most common questions about adding support for unsupported consent plugins.

Why do I need to choose Yes in the GDPR setting?

With Automatic, the plugin only limits the feed when it detects a supported consent plugin. Yes limits the feed for all visitors until your snippet runs after a visitor accepts. See Turning On the GDPR Setting.

Do I need a separate snippet for each feed on my site?

No. Each snippet goes through all of the feeds of that plugin on the page, so one snippet covers them all.

What if my consent plugin can’t run custom JavaScript?

This method needs a consent plugin that can run custom JavaScript code. You can still set the GDPR setting to Yes, which shows the GDPR limited version to all visitors, including those who accept the cookie notice. Our GDPR consent plugin list shows which consent plugins our feed plugins detect on their own.

Do I need more than one snippet if I use several of your feed plugins?

Yes. Each feed plugin has its own snippet, so add the snippet for every feed plugin you use to your consent plugin’s JavaScript setting.

support

Couldn’t find your answer in the docs?

Contact Support