-
Notifications
You must be signed in to change notification settings - Fork 0
/
ray_home.html
33 lines (29 loc) · 1.16 KB
/
ray_home.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>AIQUA - Peronsalization Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="/sdk-loader.js"></script>
<script src="https://cdn.qgr.ph/qgraph-wp-1.js"></script>
</head>
<body>
<h1>Peronsalization Demo</h1>
<h2>Hey! <span qg-tag="characteristic-title">folks<span></h2>
<img src="/images/half-water.webp" />
<div>
<label><input name="ans" type="radio" value="optimist"/> A - Half Full?</label>
<label><input name="ans" type="radio" value="pessimist"/> B - Half empty?</label>
<label><input name="ans" type="radio" value="alchoholic"/> C - Doesn't have enough ice?</label>
</div>
<button id="submit">Submit</button>
<script type="text/javascript">
const submitBtn = document.getElementById('submit');
submitBtn.addEventListener('click', () => {
const ans = [...document.querySelectorAll('[name=ans]')].find(elem => elem.checked);
qg('identify', { insight: ans.value });
});
</script>
</body>
</html>