Skip to content
Back to Documentation

COKIQ docs

React Setup

Install COKIQ in React applications and verify banner display, consent persistence, and analytics behavior.

Best for

React developers and frontend teams.

Setup steps

Step 1

Install at the app shell

Load COKIQ once near the top-level app shell, not inside repeated components.

Step 2

Test route changes

Confirm the banner and consent state remain stable across client-side navigation.

Step 3

Review analytics code

Coordinate analytics and marketing pixels with consent categories before launch.

Step 4

Validate logs

Use a test browser session to confirm choices are captured and available for review.

Implementation checklist

  • One script instance
  • No duplicate banner mount
  • Consent state persists
  • Analytics behavior verified
  • Logs available after test choice

FAQ

Can React apps use the universal script?

Yes. Install the universal script once in the app shell if a helper package is not used.

What is the main React risk?

Duplicate script loading during route/component re-renders is the most common implementation risk.