neosrulez/cookieoptin

There is no license information available for the latest version (2.0.8) of this package.

A package which handles Cookie Opt-In for Neos CMS.

Installs: 4 630

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:neos-package

2.0.8 2023-07-27 08:18 UTC

This package is not auto-updated.

Last update: 2024-04-18 11:45:08 UTC


README

A package which handles Cookie Opt-In for Neos CMS.

Installation

The NeosRulez.CookieOptIn package is listed on packagist (https://packagist.org/packages/neosrulez/cookieoptin) - therefore you don't have to include the package in your "repositories" entry any more.

Just run:

composer require neosrulez/cookieoptin

Usage

Definition of the cookies used in the json files in all necessary languages.

NeosRulez:
  CookieOptIn:
    metadataPathAndFilename: 'resource://NeosRulez.CookieOptIn/Private/Metadata/{lang}.cookie.json'
    bannerDelayTime: 2000

Neos side

Definition of data-attributes (data-cookie) in iframe tags and additionally type="text/plain" in script tags. It's easy with Fusion.

<iframe data-cookie="bar" width="1116" height="628" cookie-src="https://www.youtube.com/embed/7KUdmFyefSA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<script data-cookie="all" type="text/plain" async src="https://www.googletagmanager.com/gtag/js?id=UA-141147524-30"></script>
<script data-cookie="all" type="text/plain">window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag("js", new Date());gtag("config", "UA-141147524-30");</script>

Author