Skip to main content
ESC

Searching...

Quick Links

Type to search • Press to navigate • Enter to select

Keep typing to search...

No results found

No documentation matches ""

Cookie Consent

Configure the GDPR cookie consent banner and privacy settings.

Dec 5, 2025

Privacy compliance is essential. Reward Loyalty includes a built-in cookie consent banner to help you meet GDPR and other privacy regulations.

Enabling the Banner

The cookie consent banner is controlled via your environment settings.

  1. Open your .env file in the root directory
  2. Find or add the APP_COOKIE_CONSENT setting:
APP_COOKIE_CONSENT=true
  • true: Shows the banner to all visitors
  • false: Hides the banner (default)

When enabled, visitors will see a banner asking them to accept or decline cookies.

How It Works

When a user makes a choice, their preference is saved in a cookie_consent cookie.

  • Accept: The system allows tracking scripts to run.
  • Decline: Tracking scripts are blocked.

Checking Consent in Code

If you're developing custom features, you can check for consent in your PHP code:

use App\Http\Controllers\Cookie\CookieController;

if (CookieController::userConsentsToCookies()) {
    // Safe to run tracking code or store non-essential cookies
}

Checking Consent in Themes

In your Blade templates, you can conditionally load scripts (like Google Analytics) based on consent:

@if (\App\Http\Controllers\Cookie\CookieController::userConsentsToCookies())
    <!-- Load Analytics Script -->
    <script>...</script>
@else
    <!-- Load Anonymized Script or Nothing -->
@endif

Note: If APP_COOKIE_CONSENT is set to false, the system assumes consent is granted by default (or not required), and userConsentsToCookies() returns true.

Updating Your Privacy Policy

The consent banner links to your Privacy Policy. You should ensure this policy accurately reflects your data usage.

To edit the policy:

  1. Navigate to lang/<locale>/md/
  2. Open privacy.md
  3. Update the content to match your legal requirements