-
Notifications
You must be signed in to change notification settings - Fork 3
/
template.html
209 lines (199 loc) · 11.6 KB
/
template.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Keentroversy</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="shortcut icon" href="https://keen.io/assets/images/favicon.ico">
<script crossorigin src="https://cdn.jsdelivr.net/npm/keen-analysis@3"></script>
<link href="https://cdn.jsdelivr.net/npm/keen-dataviz@3/dist/keen-dataviz.min.css" rel="stylesheet" />
<script crossorigin src="https://cdn.jsdelivr.net/npm/keen-dataviz@3/dist/keen-dataviz.min.js"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/keen-tracking@4"></script>
</head>
<body>
<section class="hero is-info is-medium is-bold">
<div class="hero-head">
<nav class="navbar">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="https://keen.io">
<svg class="keen-logo mt1" height="38" width="172" xmlns="http://www.w3.org/2000/svg"
version="1.1" x="0px" y="0px" viewBox="0 0 594 128" enable-background="new 0 0 594 128"
xml:space="preserve">
<g class="icon">
<polygon fill="#fe6672" points="59.811,73.135 66.859,85.34 49.275,115.863 140.807,115.863 147.814,128 28.045,128"></polygon>
<polygon fill="#00cfbb" points="59.873,24.297 91.504,79.242 77.413,79.242 59.826,48.781 13.958,128 0,128"></polygon>
<polygon fill="#00bbde" points="133.769,103.674 70.364,103.674 77.418,91.432 112.586,91.432 66.915,12.1 73.9,0"></polygon>
</g>
<path class="text-2" fill="#FFFFFF" d="M246.12 94.163L216.29 57.373l27.704-27.484c1.199-1.195 1.782-2.475 1.782-3.91 0-2.906-2.496-5.453-5.341-5.453 -1.869 0-3.128 0.887-4.262 1.896l-43.89 44.996V26.094c0-3.07-2.498-5.568-5.568-5.568 -2.96 0-5.461 2.549-5.461 5.568v72.01c0 3.02 2.501 5.57 5.461 5.57 3.07 0 5.568-2.498 5.568-5.57V81.145l16.181-16.178 29.093 36.231c1.15 1.643 2.655 2.477 4.474 2.477 3.021 0 5.573-2.551 5.573-5.57C247.604 96.301 246.896 95.151 246.12 94.163zM309.211 71.702c0-15.379-9.767-30.948-28.434-30.948 -16.456 0-29.348 13.941-29.348 31.743v0.23c0 18.1 13.108 31.748 30.49 31.748 9.265 0 16.353-2.836 22.95-9.162 1.104-0.967 1.713-2.248 1.713-3.609 0-2.631-2.192-4.771-4.887-4.771 -1.466 0-2.503 0.719-3.195 1.293 -4.886 4.5-10.083 6.596-16.354 6.596 -10.378 0-18.167-7.188-19.675-18.006h41.627C306.917 76.815 309.211 74.52 309.211 71.702zM280.55 50.182c11.501 0 16.667 9.162 17.751 18.117h-35.831C263.956 57.574 271.266 50.182 280.55 50.182zM374.018 71.702c0-15.379-9.767-30.948-28.434-30.948 -16.454 0-29.344 13.941-29.344 31.743v0.23c0 18.1 13.107 31.748 30.486 31.748 9.263 0 16.351-2.836 22.95-9.164 1.103-0.965 1.71-2.246 1.71-3.607 0-2.631-2.193-4.771-4.889-4.771 -1.464 0-2.501 0.719-3.193 1.293 -4.886 4.5-10.082 6.596-16.352 6.596 -10.374 0-18.163-7.189-19.677-18.006h41.626C371.723 76.815 374.018 74.52 374.018 71.702zM345.357 50.182c11.497 0 16.662 9.162 17.749 18.117h-35.83C328.762 57.574 336.072 50.182 345.357 50.182zM414.734 40.754c-8.037 0-14.492 3.127-19.233 9.309V46.9c0-3.062-2.396-5.461-5.455-5.461 -2.945 0-5.342 2.449-5.342 5.461v51.319c0 3.059 2.396 5.455 5.455 5.455 3.045 0 5.342-2.346 5.342-5.455V68.271c0-10.312 6.874-17.514 16.717-17.514 9.606 0 15.342 6.291 15.342 16.826v30.635c0 3.059 2.398 5.455 5.461 5.455 2.999 0 5.348-2.396 5.348-5.455V65.414C438.369 50.434 429.092 40.754 414.734 40.754z"></path>
</svg>
</a>
<span class="navbar-burger burger" data-target="navbarMenu">
<span></span>
<span></span>
<span></span>
</span>
</div>
<div id="navbarMenu" class="navbar-menu">
<div class="navbar-end">
<a class="navbar-item" href="https://keen.io">Keen Home</a>
<span class="navbar-item">
<a class="button is-white is-outlined" href="https://keen.io/home">
<span title="Log into keen">Log In</span>
</a>
</span>
<span class="navbar-item">
<a class="button is-white" href="https://keen.io/signup?source=Keentroversy">
<span title="Sign up for keen">Sign Up</span>
</a>
</span>
</div>
</div>
</div>
</nav>
</div>
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title">
Keentroversy of the month - Is a hotdog a sandwich ?.
</h1>
<h2 class="subtitle">
A debate that has been raging for at least a few years and possibly since the fourth Earl of Sandwich,
otherwise known as John Montagu, pretended to be the first person to slap something between two
slices of bread. The Keen team is a house divided and we need you to help us settle the score.
</h2>
</div>
</div>
</section>
<div class="box cta">
<p class="has-text-centered">
This counter was created in less than 15 minutes with Keen. <a href="https://keen.io/signup?source=Keentroversy">Sign up</a> today to create customer-facing metrics fast.
</p>
</div>
<section class="container">
<div class="columns features">
<div class="column is-6">
<div class="card is-shady">
<div class="card-content has-text-centered">
<a href="https://keen.github.io/keentroversies?is_sandwich=true">
<span class="icon has-text-success">
<i class="fa fa-check-circle fa-4x"></i>
</span>
</a>
</div>
<div class="card-content">
<div class="content">
<p id="yes_result"></p>
</div>
<div>
<p>"A sandwich is commonly depicted as two slices of bread with a filling between. But given the popularity of the Double Down, a sandwich defined by two pieces of fried chicken with a cheese filling, or gluten-free 'un-wiches' with lettuce in place of bread, it's clear that conservative ideals of what is and what is not a sandwich are outdated. We can define a sandwich as simply a filling surrounded by an edible grip. By this logic, Poptarts, ravioli, quesadillas are all sandwiches." - <i> Joe Massengill, Digital Marketing</i></p>
</div>
</div>
</div>
</div>
<div class="column is-6">
<div class="card is-shady">
<div class="card-content has-text-centered">
<a href="https://keen.github.io/keentroversies?is_sandwich=false">
<span class="icon has-text-danger">
<i class="fa fa-times-circle fa-4x"></i>
</span>
</a>
</div>
<div class="card-content">
<div class="content">
<p id="no_result"></p>
</div>
<div>
<p>"I’ve developed a proprietary framework for determining what is a sandwich, and a hot dog is definitely not a sandwich" - <i> Jorge Cano, Solutions Architect</i></p>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
//setup basic gdpr friendly page tracking
const trackingClient = new KeenTracking({
projectId: '5c4b4954c9e77c0001edb25f',
writeKey: '7B6FFCAE7FEB93CB587413945BB4EE2E11F1E9A9E3D7EABD42F9C2E9EB22BD3625004E3723F50F970E862F6125CF06AEC1DB1DD7404ABD125C684DFEFF21E205F4F388BEF202125FADE21D10F309EF26933DC900B71FF565447DD2EED242CDDF'
})
var keentroversyId = "Jan2019"
var yesTitle = "Of course a hotdog is a sandwich!"
var yesUrlArg = "is_sandwich=true"
var noTitle = "No, a hotdog is NOT a sandwich."
var noUrlArg = "is_sandwich=false"
/* you shouldn't have to edit anything below here */
trackingClient.extendEvents(function () {
return {
"keentroversyId": keentroversyId,
};
});
trackingClient.initAutoTracking({
recordScrollState: false, // see how far people scrolled
recordClicks: true, // record clicks on A links
// GDPR related options
collectIpAddress: false, // default
collectUuid: false, // default
});
const chart = new KeenDataviz({
container: '#yes_result', // querySelector
title: yesTitle
});
const chart2 = new KeenDataviz({
container: '#no_result', // querySelector
title: noTitle
});
// Use keen-analysis.js to run a query
const client = new KeenAnalysis({
projectId: '5c4b4954c9e77c0001edb25f',
readKey: 'C60DB577779B643B528C4DB57953168C22D3D32709D58B6B823CE39C2E2F9885079046E28286D0A2820C9E085995F3F39C550504DA46370E1724289FB623840823822816C52AF5AD85A35F4BF9A8FFA494EE6DF5EA28BEDBA3988500A598202D'
});
client
.query({
analysis_type: 'count',
event_collection: 'pageviews',
filters: [
{
"operator":"contains",
"property_name":"url.full",
"property_value":yesUrlArg
},
{
"operator":"eq",
"property_name": "keentroversyId",
"property_value": keentroversyId
}
],
timeframe: 'this_30_days'
})
.then(function (results) {
chart.render(results);
})
.catch(function (error) {
chart.message(error.message);
});
client
.query({
analysis_type: 'count',
event_collection: 'pageviews',
filters: [
{"operator":"contains","property_name":"url.full","property_value":noUrlArg},
{
"operator":"eq",
"property_name": "keentroversyId",
"property_value": keentroversyId
}],
timeframe: 'this_30_days'
})
.then(function (results) {
chart2.render(results);
})
.catch(function (error) {
chart.message(error.message);
});
</script>
</body>
</html>