Projet

Général

Profil

Paste
Télécharger (1,44 ko) Statistiques
| Branche: | Révision:

root / bin / d7-reset-matomo-variables.sh @ 6de61b86

1
#!/bin/sh
2

    
3
site="$1"
4

    
5
###### Common to all sites
6
drush @"${site}" -yq en matomo
7
drush @"${site}" -yq vset matomo_url_http "http://piwik.centrale-marseille.fr/"
8
drush @"${site}" -yq vset matomo_url_https "https://piwik.centrale-marseille.fr/"
9
# Matomo cache.
10
drush @"${site}" -yq vset matomo_cache 1
11
drush @"${site}" -yq vset matomo_visibility_roles "1"
12
# Matomo is enable for everyone except the administrator
13
drush @"${site}" -yq vset --format=json matomo_roles '[3]'
14
drush @"${site}" -yq vset matomo_page_title_hierarchy 1
15
# Activate local search.
16
drush @"${site}" -yq vset matomo_site_search 1
17

    
18
##### Specific
19
# Note: you can read the matomo site id from the url in matomo
20
case "$1" in
21
    accueil)
22
	matomo_id=286
23
	;;
24
    agora)
25
	matomo_id=116
26
	;;
27
    bda)
28
	matomo_id=273
29
	;;
30
    bde)
31
	matomo_id=274
32
	;;
33
    bds)
34
	matomo_id=275
35
	;;
36
    cac13)
37
	matomo_id=276
38
	;;
39
    cheer-up)
40
	matomo_id=277
41
	;;
42
    clubfinance)
43
	matomo_id=278
44
	;;
45
    clubrobot)
46
	matomo_id=279
47
	;;
48
    echangesphoceens)
49
	matomo_id=280
50
	;;
51
    eluseleves)
52
	matomo_id=281
53
	;;
54
    ercm)
55
	matomo_id=282
56
	;;
57
    fablab)
58
	matomo_id=151
59
	;;
60
    forumentreprises)
61
	matomo_id=270
62
	;;
63
    ginfo)
64
	matomo_id=283
65
	;;
66
    icm)
67
	matomo_id=284
68
	;;
69
    isf)
70
	matomo_id=285
71
	;;
72
    ksi)
73
	matomo_id=209
74
	;;
75
    mdv)
76
	matomo_id=99
77
	;;
78
    tvp)
79
	matomo_id=110
80
	;;
81
    ftorregrosa)
82
	matomo_id=314
83
	;;
84
    default)
85
	matomo_id=101
86
	;;
87
    *)
88
	matomo_id=287
89
	;;
90
esac
91

    
92
drush @"${site}" -yq vset matomo_site_id "${matomo_id}"