Merge ubuntu-cve-tracker:cve-html-analytics into ubuntu-cve-tracker:master

Proposed by Mark Morlino
Status: Merged
Approved by: Mark Morlino
Approved revision: 437c6f0f745462de8033376db96890c97df462d6
Merged at revision: 2ea7df7bd1e69e1e489978d2724a936eb3faa1b8
Proposed branch: ubuntu-cve-tracker:cve-html-analytics
Merge into: ubuntu-cve-tracker:master
Diff against target: 81 lines (+37/-0)
4 files modified
scripts/html-report (+10/-0)
scripts/html-top/index.html (+9/-0)
scripts/html-top/priority.html (+9/-0)
scripts/html_export.py (+9/-0)
Reviewer Review Type Date Requested Status
Alex Murray Approve
Review via email: mp+380788@code.launchpad.net

Commit message

add javascript google analytics to generated cve tracker html pages

Description of the change

dd javascript google analytics to generated cve tracker html pages

To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/html-report b/scripts/html-report
2index 1ea302a..31333ff 100755
3--- a/scripts/html-report
4+++ b/scripts/html-report
5@@ -94,6 +94,16 @@ header() {
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <head>
8
9+<!-- Global site tag (gtag.js) - Google Analytics -->
10+<script async src="https://www.googletagmanager.com/gtag/js?id=UA-96529618-15"></script>
11+<script>
12+ window.dataLayer = window.dataLayer || [];
13+ function gtag(){dataLayer.push(arguments);}
14+ gtag('js', new Date());
15+
16+ gtag('config', 'UA-96529618-15');
17+</script>
18+
19 <title>Ubuntu CVE Tracker</title>
20
21 <meta charset="utf-8">
22diff --git a/scripts/html-top/index.html b/scripts/html-top/index.html
23index a363302..34047fd 100644
24--- a/scripts/html-top/index.html
25+++ b/scripts/html-top/index.html
26@@ -1,6 +1,15 @@
27 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
28 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
29 <head>
30+<!-- Global site tag (gtag.js) - Google Analytics -->
31+<script async src="https://www.googletagmanager.com/gtag/js?id=UA-96529618-15"></script>
32+<script>
33+ window.dataLayer = window.dataLayer || [];
34+ function gtag(){dataLayer.push(arguments);}
35+ gtag('js', new Date());
36+
37+ gtag('config', 'UA-96529618-15');
38+</script>
39 <title>Ubuntu CVE Tracker</title>
40 <meta charset="utf-8">
41 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
42diff --git a/scripts/html-top/priority.html b/scripts/html-top/priority.html
43index df12f5a..d339e9f 100755
44--- a/scripts/html-top/priority.html
45+++ b/scripts/html-top/priority.html
46@@ -1,6 +1,15 @@
47 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
48 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
49 <head>
50+<!-- Global site tag (gtag.js) - Google Analytics -->
51+<script async src="https://www.googletagmanager.com/gtag/js?id=UA-96529618-15"></script>
52+<script>
53+ window.dataLayer = window.dataLayer || [];
54+ function gtag(){dataLayer.push(arguments);}
55+ gtag('js', new Date());
56+
57+ gtag('config', 'UA-96529618-15');
58+</script>
59 <title>Ubuntu CVE Tracker Priorities</title>
60 <meta charset="utf-8">
61 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
62diff --git a/scripts/html_export.py b/scripts/html_export.py
63index 6d9a80f..aa82a85 100755
64--- a/scripts/html_export.py
65+++ b/scripts/html_export.py
66@@ -32,6 +32,15 @@ def html_header(title, description, outfd):
67 print('''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
68 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
69 <head>
70+<!-- Global site tag (gtag.js) - Google Analytics -->
71+<script async src="https://www.googletagmanager.com/gtag/js?id=UA-96529618-15"></script>
72+<script>
73+ window.dataLayer = window.dataLayer || [];
74+ function gtag(){dataLayer.push(arguments);}
75+ gtag('js', new Date());
76+
77+ gtag('config', 'UA-96529618-15');
78+</script>
79 <title>%s</title>
80 <meta charset="utf-8">
81 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

Subscribers

People subscribed via source and target branches