Cookie Consent banner doesn't show up in React Native app

Hey,

I have a problem with displaying Cookie Consent banner in my React Native app. It doesn’t show up at all, even though to my understanding should work out of the box.

Things I have checked:
@piwikpro/react-native-piwik-pro-sdk package v1.1.0 installed and initialized successfully without errors
— “Ask visitors for consent” setting is turned on in the dashboard
— “Consent Form” selected in the Reminder-section of Consent settings

What should I do in order to get it to work?

Thanks

Hey @sergey.orangit,

Please make sure that “Use a custom consent form” is disabled -


Otherwise the default consent banner will be hidden.

You can find this option when you click on the “View” button

Please let me know if you still have the issue.

Have a great day! :slight_smile:

Hey Kamil,

I can confirm that “Use a custom consent form” setting is disabled. Here is a screenshot (in Finnish):

Is there any other setting I should check?

Best Regards,
Sergey

Hi @sergey.orangit,

Are there any errors in console that would indicate any issue with loading, either Piwik PRO or consent itself? (If the issue is with loading Piwik PRO itself, you will also not see any data collected, as currently you have turned on Anonymous tracking which should work regardless of consent)

Best,
Oliwer

Hey Oliwer,

There is no errors in the console, and the initialization goes through from what I can see.

Here is the initialization code:

  const piwikUrl = process.env.PIWIK_URL as string;
  const piwikKey = process.env.PIWIK_KEY as string;
  
  useEffect(() => {
    async function initPiwik() {
      try {
        await PiwikProSdk.init(piwikUrl, piwikKey);
        console.log("Piwik initialized successfully");
      } catch (error) {
        console.error("Error initializing Piwik", error);
      }
    }
    initPiwik()
  }, [piwikUrl, piwikKey]);

Both PIWIK_URL and PIWIK_KEY have values. I can see the “Piwik initialized successfully” -message in the console.

What else should I look into? Also, could you maybe elaborate on the Anonymous tracking — could it be the reason why the consent banner doesn’t show up?