Issue with Finsweet Cookie Consent Component and Custom Script Execution

Hello @juicydisorder!

We can resolve both issues by wrapping your code in the Consent API.

In its most basic form, it looks like this

  window.fsComponents = window.fsComponents || [];
  window.fsComponents.push([
    'consent',
    (instance) => {
      console.log('Consent instance:', instance);
      // Add your code here
    },
  ]);

The code inside will only run after the Consent script loads and runs.

If you need help implementing this please let me know!