recipe.yml
1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Google Analytics
type: Drupal CMS
description: Adds tracking of website traffic using Google Analytics and Google Tag Manager. Requires a Google Tag Manager ID.
recipes:
- drupal_cms_privacy_basic
install:
- google_tag
input:
property_id:
data_type: string
description: "The Google Tag, in the form of GT-xxxxxx, G-xxxxxxxx, AW-xxxxxxxxx, GTM-xxxxxxxx or DC-xxxxxxxx."
prompt:
method: ask
arguments:
question: "Enter the Google Tag ID for tracking. This ID is unique to each site you want to track separately, and must be in the form of GT-xxxxxx, G-xxxxxxxx, AW-xxxxxxxxx, GTM-xxxxxxxx or DC-xxxxxxxx."
form:
'#type': 'textfield'
'#title': 'Google Tag ID'
'#description': "The Google Tag ID for tracking. This ID is unique to each site you want to track separately, and must be in the form of GT-xxxxxx, G-xxxxxxxx, AW-xxxxxxxxx, GTM-xxxxxxxx or DC-xxxxxxxx."
default:
source: value
value: ''
config:
strict: false
import:
google_tag: '*'
klaro:
- klaro.klaro_app.ga
- klaro.klaro_app.gtm
actions:
google_tag.settings:
simpleConfigUpdate:
default_google_tag_entity: drupal
google_tag.container.drupal:
set:
property_name: tag_container_ids
value:
- ${property_id}
klaro.klaro_app.ga:
enable: []
klaro.klaro_app.gtm:
enable: []
klaro.settings:
simpleConfigUpdate:
dialog_mode: notice