forked from dfe-analytical-services/lsip_dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoogle-analytics.html
147 lines (137 loc) · 5.25 KB
/
google-analytics.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MMB6NG2FE1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MMB6NG2FE1');
/*
Adding tracking for the main downlaod button*/
$(document).on('click', 'a#hubDownload', function(e) {
gtag('event', 'DownloadHub', {'event_category' : 'Download button click'
});
});
/*
Adding tracking for the data table downloads button*/
$(document).on('click', 'a#downloadData1', function(e) {
gtag('event', 'DownloadTable1EmpRat', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData2', function(e) {
gtag('event', 'DownloadTable2EmpOcc', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData3', function(e) {
gtag('event', 'DownloadTable3EmpInd', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData4', function(e) {
gtag('event', 'DownloadTable4Fe', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData5', function(e) {
gtag('event', 'DownloadTable5eSsa', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData6', function(e) {
gtag('event', 'DownloadTable6Qual', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData7', function(e) {
gtag('event', 'DownloadTable7EntSize', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData8', function(e) {
gtag('event', 'DownloadTable8EntSizeInd', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData9', function(e) {
gtag('event', 'DownloadTable9Business', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData10', function(e) {
gtag('event', 'DownloadTable10Ks4', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData11', function(e) {
gtag('event', 'DownloadTable11Ks5', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadData12', function(e) {
gtag('event', 'DownloadTable12JobAds', {'event_category' : 'Download button click'
});
});
/*
Adding tracking for the overview downloads button*/
$(document).on('click', 'a#download_btn0a', function(e) {
gtag('event', 'DownloadOverviewAll', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#download_btn0b', function(e) {
gtag('event', 'DownloadOverviewCurrent', {'event_category' : 'Download button click'
});
});
/*
Adding tracking for the local skills downloads button*/
$(document).on('click', 'a#downloadV1All', function(e) {
gtag('event', 'DownloadLSAll', {'event_category' : 'Download button click'
});
});
$(document).on('click', 'a#downloadV1Current', function(e) {
gtag('event', 'DownloadLSCurrent', {'event_category' : 'Download button click'
});
});
/*
Adding tracking for the screenshot button*/
$(document).on('click', 'a#screenshotOverview', function(e) {
gtag('event', 'ScreenshotOverview', {'event_category' : 'Screenshot button click'
});
});
$(document).on('click', 'a#screenshotFile', function(e) {
gtag('event', 'ScreenshotLS', {'event_category' : 'Screenshot button click'
});
});
/*
Adding tracking for the local skills area filter*/
$(document).on('change', 'select#geoChoice', function(e) {
gtag('event', 'LsArea', {'event_category' : 'choose Area',
'event_label' : document.querySelector('select#geoChoice').value
});
});
/*
/*
Adding tracking for the local skills comparison area filter*/
$(document).on('change', 'select#geoComps', function(e) {
gtag('event', 'LsCompArea', {'event_category' : 'choose Area',
'event_label' : document.querySelector('select#geoComps').value
});
});
/*
Adding tracking for the overview area filter*/
$(document).on('change', 'select#geoChoiceOver', function(e) {
gtag('event', 'OverviewArea', {'event_category' : 'choose Area',
'event_label' : document.querySelector('select#geoChoiceOver').value
});
});
/*
Adding tracking for the datahub area filter*/
$(document).on('change', 'select#hubArea', function(e) {
gtag('event', 'HubArea', {'event_category' : 'choose Area',
'event_label' : document.querySelector('select#hubArea').value
});
});
/*
Adding tracking for the LS metric filter*/
$(document).on('change', 'select#splashMetric', function(e) {
gtag('event', 'LsMetric', {'event_category' : 'choose Area',
'event_label' : document.querySelector('select#splashMetric').value
});
});
/*
Adding tracking for the hub metric filter*/
$(document).on('change', 'select#hubMetricInput', function(e) {
gtag('event', 'HubMetric', {'event_category' : 'choose Area',
'event_label' : document.querySelector('select#hubMetricInput').value
});
});
</script>