Cookie Banner

CookieRay Team
•
4 min read

Cookie Banner

The banner is the consent surface your visitors see. It’s where they Accept All, Decline All, or open a Preferences modal to choose exactly which categories of cookies they allow. You can shape almost every part of it from the admin without touching code.

Layouts and placement

CookieRay ships with two layouts:

  • Card β€” a compact, contained panel.
  • Bar β€” a horizontal strip. It runs edge to edge at the top-center and bottom-center positions, and is narrower at the other positions.

Each layout can be positioned in one of nine placement positions, so you can put the banner wherever it fits your design best (corners, edges, or centered).

A live preview in the admin updates as you edit, so you can see your changes before publishing them to the front end.

Visitor choices

From the banner, visitors can:

  • Accept All β€” grant consent to every category.
  • Decline All β€” refuse all non-essential categories.
  • Preferences β€” open a modal to pick individual categories. By default visitors see Strictly Necessary, Analytics, Functional and Marketing (you can rename them and edit their descriptions). The modal has Cancel and Save preferences buttons.

The Necessary category covers cookies required for the site to function. The other three are opt-in choices the visitor controls.

Customization

Everything below is editable without code, under the Banner Design admin page:

  • Banner Content β€” headline, description, and an optional privacy policy link (link text and URL)
  • Visual Style β€” layout (Card or Bar), primary color, accent color, text color, and corner radius (Sharp, Rounded, or Pill)
  • Buttons β€” the Accept, Decline, and Preferences button text, with switches to show or hide the Decline and Preferences buttons
  • Positioning β€” placement position and the overlay background
  • Cookie Categories β€” the title and description visitors see for each category in the Preferences panel
  • Advanced β€” custom CSS (CookieRay Pro)

Under Settings β†’ Banner Display, Show Floating Cookie Settings Button adds a small floating button so visitors can reopen their cookie settings after making a choice. If you turn it off, add a β€œCookie Settings” link to your footer or privacy policy instead.

When visitors are asked again

Changing the banner headline, description, Accept, Decline or Preferences button text, or the privacy policy URL gives the banner a new version. Consent recorded under the old version is no longer valid, so visitors are asked again. Other edits, such as colors, the link text or the category descriptions, do not ask visitors again. This keeps consent tied to the wording they actually saw. Visitors are also asked again when their consent passes the expiry you set under Settings β†’ Consent Expiration.

For visitors CookieRay detects in the US, a small opt-out link can appear on the page. See CCPA β€œDo Not Sell” Link.

Enabling the banner

The banner is off by default. The setting banner_enabled is false until you turn it on.

Important: No banner will appear on your site until you enable it. After installing CookieRay, design the banner under Banner Design, then go to Settings β†’ Banner Display and switch on Show Cookie Consent Banner.

  1. Open the Banner Design admin page.
  2. Choose a layout (card or bar) and a placement position.
  3. Adjust text, colors and buttons using the live preview.
  4. Confirm the Preferences modal lists the categories you want to offer.
  5. Go to Settings β†’ Banner Display and switch on Show Cookie Consent Banner so it appears to visitors.

Was this article helpful?

Your response is saved on this device.