chameleon-system/consent-management-bundle

This package is abandoned and no longer maintained. The author suggests using the chameleon-system-private/consent-management-bundle package instead.

Adds a consent layer to any tracker's javascript includes

7.1.5 2023-02-24 08:04 UTC

README

This bundle provides the feature to intercept and modify javascript includes for every local tracker (configured under "Analytics > External tracking services").

The purpose of this modification is for the javascript to not be executed immediately. Later on, the consent provider can pick these javascript blocks up and execute them selectively depending on user choices. However, this step is outside of the scope of this bundle.

Technically a class is added to the hierarchy of TPkgExternalTrackerList and GetPreBodyClosingCode() is overwritten.

Installation

The bundle needs to be added to the AppKernel.

Configuration

Please see the configuration class and help in \ChameleonSystem\ConsentManagementBundle\DependencyInjection\Configuration. provider_name and tracker_list must be provided in order for this bundle to do anything.

Examples:

chameleon_system_consent_management:
provider_name: consentmanager
tracker_list:
ChameleonSystem\ExternalTrackerGoogleAnalyticsBundle\Bridge\Chameleon\ExternalTracker\ExternalTrackerGoogleUniversalAnalytics: "s26"
chameleon_system_consent_management:
provider_name: usercentrics
tracker_list:
ChameleonSystem\ExternalTrackerGoogleAnalyticsBundle\Bridge\Chameleon\ExternalTracker\ExternalTrackerGoogleUniversalAnalytics: "Google Analytics"