Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Klaro and develop custom -az_gdpr- module for default setup #3978

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"drupal/config_sync": "3.0.0-alpha3",
"drupal/config_update": "2.0.0-alpha3",
"drupal/core-recommended": "10.3.11",
"drupal/klaro": "3.0.0-rc16",
"drupal/crop": "2.4.0",
"drupal/ctools": "*",
"drupal/date_ap_style": "2.0.2",
Expand Down
11 changes: 11 additions & 0 deletions modules/custom/az_gdpr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Quickstart GDPR Drupal module

Pre-configures the contrib Drupal [Klaro module](https://www.drupal.org/project/klaro) to include default settings.

## Requirements

### Dependencies
This module requires the following module available.

#### Packaged Dependencies
-[Klaro module](https://www.drupal.org/project/klaro)
8 changes: 8 additions & 0 deletions modules/custom/az_gdpr/az_gdpr.info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: 'Quickstart GDPR'
type: module
description: 'Provides packaged configurations for the Klaro module.'
core_version_requirement: ^10.2 || ^11
package: 'The University of Arizona'
dependencies:
- drupal:klaro
configure: klaro.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
langcode: en
status: true
dependencies: { }
id: facebook
label: Facebook
description: 'Facebook is a social media platform by Meta Platforms, Inc (USA).'
default: false
purposes:
- external_content
cookies: { }
required: false
opt_out: false
only_once: false
info_url: 'https://about.meta.com/company-info'
privacy_policy_url: 'https://www.facebook.com/privacy/policy/'
javascripts:
- www.facebook.com
callback_code: ''
wrapper_identifier: { }
attachments: { }
weight: 0
23 changes: 23 additions & 0 deletions modules/custom/az_gdpr/config/quickstart/klaro.klaro_app.ga.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
id: ga
label: 'Google Analytics'
description: 'Tracks online visits of the website as a service.'
langcode: en
status: true
default: false
purposes:
- analytics
cookies:
- { regex: '^_ga(_.*)?', path: '', domain: ''}
- { regex: '^_gid', path: '', domain: ''}
- { regex: '^IDE', path: '', domain: ''}
required: false
opt_out: false
only_once: false
weight: 1
info_url: 'https://marketingplatform.google.com/intl/de/about/analytics/'
privacy_policy_url: 'https://policies.google.com/privacy'
javascripts:
- analytics.js
attachments:
- ga4_google_analytics

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
id: gtm
label: 'Google Tag Manager'
description: 'Manages and deploys marketing tags.'
langcode: en
status: true
default: false
purposes:
- advertising
cookies: { }
required: false
opt_out: false
only_once: false
weight: 2
info_url: 'https://marketingplatform.google.com/intl/de/about/tag-manager/'
privacy_policy_url: 'https://policies.google.com/privacy'
javascripts:
- gtm.js
- gtag.js
- 'https://www.googletagmanager.com/ns.html'
attachments:
- gtm

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: hzNuWhf3WlOXqQ4aeg63ScLpSiaAV-xAMchc7a8ZyQs
ejsamboy marked this conversation as resolved.
Show resolved Hide resolved
id: advertising
label: 'Advertising and Marketing'
weight: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: HOBvXe9sLYbADwAG6LELlOHNV13mU0Zp-bjGx26ZVjk
ejsamboy marked this conversation as resolved.
Show resolved Hide resolved
id: analytics
label: Analytics
weight: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: yyjkpL26vTTIyZC_SLONChBpsPgofe37TnGSSn9YcJE
ejsamboy marked this conversation as resolved.
Show resolved Hide resolved
id: external_content
label: 'Embedded external content'
weight: 6
35 changes: 35 additions & 0 deletions modules/custom/az_gdpr/config/quickstart/klaro.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
langcode: en
deletable_cookie_domains: { }
exclude_urls: { }
disable_urls: { }
styles:
- light
dialog_mode: notice #Show notice dialog if no decision has yet been made. The dialog does not open in modal and visitors can use the page normally.
show_toggle_button: false
show_close_button: false
process_descriptions: false
override_css: true
auto_decorate_js_alter: true
auto_decorate_page_attachments: true
auto_decorate_preprocess_field: true
get_entity_thumbnail: true
auto_decorate_final_html: false
block_unknown: false
log_unknown_resources: false
block_unknown_label: 'Unknown services'
block_unknown_description: 'Allow loading of unknown external resources'
library:
element_id: 'klaro'
storage_method: 'cookie'
cookie_name: 'klaro'
cookie_expires_after_days: 180
cookie_domain: ''
group_by_purpose: false
accept_all: false
hide_decline_all: false
hide_learn_more: true
learn_more_as_button: false
additional_class: ''
html_texts: false
auto_focus: true

38 changes: 38 additions & 0 deletions modules/custom/az_gdpr/config/quickstart/klaro.texts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
langcode: en
consentModal:
title: Use of personal data and cookies
description: >
Please choose the services and 3rd party applications we would like to use.
privacyPolicy:
name: Privacy Statement
text: >
To learn more, please read our {privacyPolicy}.
url: 'https://privacy.arizona.edu/privacy-statement'
consentNotice:
changeDescription: There were changes since your last visit, please update your consent.
description: >
The University of Arizona websites utilize cookies to improve your browsing experience, analyze site performance, and support outreach and enrollment efforts. By continuing to use this site, you consent to our use of cookies. For more information, please review our {privacyPolicy}.
learnMore: Customize
ok: Ok, I Agree
save: Save
decline: Decline
close: Close
acceptAll: Accept all
acceptSelected: Accept selected
service:
disableAll:
title: Toggle all services
description: Use this switch to enable/disable all services.
optOut:
title: (opt-out)
description: This service is loaded by default (opt-out possible).
required:
title: (always required)
description: This service is always required.
purposes: Purposes
purpose: Purpose
contextualConsent:
acceptAlways: Always
acceptOnce: Yes (this time)
description: Load external content supplied by {title}?
poweredBy: Powered by Klaro!
Loading