/
base.njk
501 lines (457 loc) · 26.5 KB
/
base.njk
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
---
meta:
language: en-US
type: page
site:
name: FlowFuse
description: {{ messaging.title }}
url: https://FlowFuse.com
logo:
src: https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png
width: 396
height: 215
author:
name: FlowFuse
image:
src: https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png
eleventyComputed:
meta:
url: "{{ page.url | url | toAbsoluteUrl }}"
description: "{{ meta.description }}"
modified: "{{ page.date }}"
---
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="/css/style.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Heebo:wght@100..900&display=swap" rel="stylesheet">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#aa4444">
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="theme-color" content="#ffffff">
<!-- Meta Keywords -->
{% if tags %}
{% set filtered_tags = tags | reject('equalto', 'posts') | reject('equalto', 'node-red') | list %}
<meta name="keywords" content="{{ filtered_tags | join(', ') }}, {{ site.messaging.keywords }}">
{% elif meta.keywords %}
<meta name="keywords" content="{{ meta.keywords }}, {{ site.messaging.keywords }}">
{% else %}
<meta name="keywords" content="{{ site.messaging.keywords }}">
{% endif %}
<!-- Browser Title -->
{% if navTitle %}
<title>{{ navTitle }} • FlowFuse{% if page.url and page.url.match('\/handbook\/.+') %} Handbook{% endif %}{% if page.url and page.url.match('\/docs\/.+') %} Docs{% endif %}</title>
{% elif meta and meta.title %}
<title>{{ meta.title }} • FlowFuse{% if page.url and page.url.match('\/handbook\/.+') %} Handbook{% endif %}{% if page.url and page.url.match('\/docs\/.+') %} Docs{% endif %}</title>
{% elif title %}
<title>{{ title }} • FlowFuse{% if page.url and page.url.match('\/handbook\/.+') %} Handbook{% endif %}{% if page.url and page.url.match('\/docs\/.+') %} Docs{% endif %}</title>
{% else %}
<title>FlowFuse • {{ site.messaging.title }}</title>
{% endif %}
<link rel="canonical" href="{{ page.url | toAbsoluteUrl }}">
<!-- Browser Description -->
{% if meta and meta.description %}
<meta name="description" content="{{ meta.description }}">
{% elif description %}
<meta name="description" content="{{ description }}">
{% else %}
<meta name="description" content="{{ site.messaging.subtitle }}">
{% endif %}
{% if skipIndex -%}
<meta name="robots" content="noindex">
{%- endif %}
<!-- Open Graph Title -->
{% if navTitle %}
<meta property="og:title" content="{{ navTitle }} • FlowFuse{% if page.url and page.url.match('\/handbook\/.+') %} Handbook{% endif %}" />
{% elif meta and meta.title %}
<meta property="og:title" content="{{ meta.title }} • FlowFuse{% if page.url and page.url.match('\/handbook\/.+') %} Handbook{% endif %}" />
{% elif title %}
<meta property="og:title" content="{{ title }} • FlowFuse{% if page.url and page.url.match('\/handbook\/.+') %} Handbook{% endif %}" />
{% else %}
<meta property="og:title" content="FlowFuse • {{ site.messaging.title }}" />
{% endif %}
<!-- Open Graph Description -->
{% if meta and meta.description %}
<meta property="og:description" content="{{ meta.description }}" />
{% elif description %}
<meta property="og:description" content="{{ description }}" />
{% else %}
<meta property="og:description" content="{{ site.messaging.subtitle }}" />
{% endif %}
<!-- Open Graph URL -->
<meta property="og:url" content="{{ page.url | toAbsoluteUrl }}" />
<!-- Open Graph Image -->
{% if image %}
<meta property="og:image" content="{{ image | toAbsoluteUrl }}" />
<meta name="twitter:image" content="{{ image | toAbsoluteUrl }}" />
{% else %}
<meta property="og:image" content="{{ 'images/og-social-tile.jpg' | toAbsoluteUrl }}" />
<meta name="twitter:image" content="{{ 'images/og-social-tile.jpg' | toAbsoluteUrl }}" />
{% endif %}
{% if tags and 'posts' in tags %}
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@FlowFuseinc" />
<meta name="twitter:creator" content="@{{ team[authors|first].twitter }}" />
{% else %}
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:description" content="" />
<meta name="twitter:site" content="@FlowFuseinc" />
{% endif %}
{% if nav %}
<meta property="article:section" content="{{ nav }}" />
{% endif %}
{% set js %}{% include "base.js" %}{% endset %}
<script>{{ js | jsmin | safe }}</script>
{% jsonLdScript meta, type, tags %}
<script type="module" src="/js/flowrenderer.min.js"></script>
{%- if not DEV_MODE -%}
<!-- Google Consent -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Set cookies to denied by default in EU countries, California, Brazil, Canada and Australia
gtag('consent', 'default', {
'ad_storage': 'denied',
'analytics_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'region': ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'ES', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'SE', 'GB', 'US-CA', 'BR', 'CA', 'AU']
});
</script>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
'gtm.start':
new Date().getTime(), event: 'gtm.js'
}); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-55L36797');</script>
<!-- End Google Tag Manager -->
{%- endif -%}
</head>
<body class="font-sans ff-website leading-normal tracking-normal gradient text-gray-500 min-h-screen flex flex-col">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-55L36797"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="flex-grow base">
<div class="w-full">
<!-- Events Banner Comment out line below to remove banner-->
{% include "../components/events-banner.njk" %}
<!-- Navigation Header -->
<header id="ff-header" class="ff-header">
<nav class="relative w-full flex items-center justify-between mx-auto container md:max-w-screen-xl">
<a class="flex md:hidden lg:flex no-underline hover:no-underline font-bold h-8 w-40 flex-row" href="/" style="font-family:'Baloo 2', sans-serif">
{% include "components/flowfuse-wordmark.njk" %}
</a>
<a class="w-8 h-8 hidden md:block lg:hidden" href="/" style="font-family:'Baloo 2', sans-serif">
{% include "components/flowfuse-square.svg" %}
</a>
<div class="block md:hidden">
<button id="nav-toggle" class="text-gray-700 flex items-center text-red-hero">
<svg class="burger fill-current h-4 w-4" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/></svg>
<svg class="close fill-current h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>
</button>
</div>
<!-- Nav -->
<ul id="nav-content" class="">
{% navoption "Pricing", "/pricing/", 0 %}{% endnavoption %}
{% navoption "Product", null, 0 %}
<ul>
{% navoption "Features", "/product/features/", 1, "star" %}{% endnavoption %}
{% navoption "Roadmap", "/product/roadmap/", 1, "map" %}{% endnavoption %}
{% navoption "Customer Stories", "/customer-stories/", 1, "presentation" %}{% endnavoption %}
{% navoption "Blueprint Library", "/blueprints/", 1, "building-library" %}{% endnavoption %}
</ul>
{% endnavoption %}
{% navoption "Solutions", null, 0 %}
<ul>
{% navoption "Manufacturing", "/solutions/manufacturing/", 1, "cog" %}{% endnavoption %}
{% navoption "Device management", "/solutions/device-management/", 1, "chip" %}{% endnavoption %}
{% navoption "Data integration", "/solutions/data-integration/", 1, "db" %}{% endnavoption %}
</ul>
{% endnavoption %}
{% navoption "Company", null, 0 %}
<ul class="sm:grid sm:grid-flow-col sm:grid-rows-5 sm:grid-cols-1 sm:pr-9">
{% navoption "About", "/about/", 1, "info" %}{% endnavoption %}
{% navoption "Changelog", "/changelog/", 1, "cog" %}{% endnavoption %}
{% navoption "Partners", "/partners/", 1, "puzzle-piece" %}{% endnavoption %}
{% navoption "Professional services", "/professional-services/", 1, "academic-cap" %}{% endnavoption %}
{% navoption "Support", "/support/", 1, "chat" %}{% endnavoption %}
{% navoption "Handbook", "/handbook/", 1, "star" %}{% endnavoption %}
{% navoption "Jobs", "https://boards.greenhouse.io/flowfuse", 1, "case" %}{% endnavoption %}
{% navoption "Team", "/team/", 1, "users" %}{% endnavoption %}
{% navoption "Contact us", "/contact-us/", 1, "mail" %}{% endnavoption %}
{% navoption "Privacy", "/privacy-policy/", 1, "privacy" %}{% endnavoption %}
</ul>
{% endnavoption %}
{% navoption "Resources", null, 0 %}
<ul class="sm:grid sm:grid-flow-col sm:grid-rows-4 sm:grid-cols-1 sm:pr-9">
{% navoption "Blog", "/blog/", 1, "newspaper" %}{% endnavoption %}
{% navoption "Webinars", "/webinars/", 1, "screen" %}{% endnavoption %}
{% navoption "Github", "https://github.com/FlowFuse/flowfuse", 1, "github", true %}{% endnavoption %}
{% navoption "Docs", "/docs/", 1, "document-text" %}{% endnavoption %}
{% navoption "Support forums", "https://discourse.nodered.org/c/vendors/flowfuse/24/", 1, "chat-bubble-left-right-sm" %}{% endnavoption %}
{% navoption "Customer Stories", "/customer-stories/", 1, "presentation" %}{% endnavoption %}
{% navoption "Node-RED", "/node-red/", 1, "info" %}{% endnavoption %}
{% navoption "Unified Namespace", "/unified-namespace/", 1, "info" %}{% endnavoption %}
</ul>
{% endnavoption %}
{% navoption "Docs", "/docs/", 0, false %}{% endnavoption %}
</ul>
<!-- CTAs -->
<ul class="hidden cta top-8 right-0 border shadow-sm md:inline md:shadow-none w-36 z-10 md:border-0 bg-white md:bg-transparent md:w-auto rounded md:static md:float-none md:flex md:flex-row flex-col items-center justify-end font-medium text no-underline">
<li class="flex"><a href="{{ site.appURL }}">Sign In</a></li>
<li class="flex"><a href="{{ site.appURL }}/account/create" onclick="capture('cta-join', {'position': 'header'})">Free Trial</a></li>
<a class="ml-2 ff-btn ff-btn--primary uppercase text-sm inline-flex" href="/contact-us" onclick="capture('cta-talk-us', {'position': 'header'})">Talk to Us</a>
</ul>
</nav>
<!-- Mobile CTAs -->
<div id="mobile-ctas" class="hidden fixed bottom-0 z-20">
<div class="grid grid-cols-2 gap-2">
<a href="{{ site.appURL }}" class="ff-btn ff-btn--primary-outlined">Sign In</a>
<a href="{{ site.appURL }}/account/create" onclick="capture('cta-join', {'position': 'header'})" class="ff-btn ff-btn--primary-outlined">Free Trial</a>
</div>
<a class="ff-btn ff-btn--primary" href="/contact-us" onclick="capture('cta-talk-to-sales', {'position': 'header'})">Talk to Sales</a>
</div>
</header>
<!-- Main Content -->
<main class="flex flex-col mx-auto items-center justify-center gradient-bg">
{{ content | safe }}
</main>
</div>
</div>
<!-- Footer -->
<footer class="ff-footer bg-gray-100 w-full border-t border-white">
<div class="py-8 px-10 md:px-6 md:pt-8 md:pb-10 max-w-md sm:max-w-screen-xl xl:mx-auto">
<div class="w-full grid gap-y-8 md:gap-y-0 md:grid-rows-2 md:grid-flow-col md:ff-footer-columns md:gap-x-8 md:justify-between">
<div class="w-36">
{% include "components/ff-logo--wordmark--grey.svg" %}
</div>
<div class="w-full self-end order-last md:order-none">
<div class="copyright-statement inline">
<div>Copyright {% year %} FlowForge Inc. DBA FlowFuse. All Rights Reserved.
<br>This site uses cookies. Click <a class="underline cursor-pointer" type="button" data-cc="show-preferencesModal">here</a> to manage your preferences.
</div>
</div>
</div>
<div class="w-full md:row-span-2">
<ul class="w-full md:max-w-[343px] grid grid-flow-col grid-rows-5 gap-y-4 sm:grid-rows-4 md:grid-rows-5 sm:justify-between md:m-auto text-base sm:gap-x-6">
<li class="inline mr-2 mb-2 md:m-0"><a href="/about/" class="py-3">About</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="/team/" class="py-3">Team</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="{{ site.jobBoard }}" class="py-3">Jobs</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="/handbook/" class="py-3">Handbook</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="/privacy-policy/" class="py-3">Privacy</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="/partners/" class="py-3">Partnerships</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="https://status.flowfuse.com/" class="py-3">Service Status</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="/support/" class="py-3">Request Support</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="/contact-us/" class="py-3">Contact Us</a></li>
<li class="inline mr-2 mb-2 md:m-0"><a href="/blog/#sign-up" onclick="capture('cta-blog-subscribe', {'position': 'footer'})" class="py-3">Sign Up to Mailing List</a></li>
</ul>
</div>
<div class="w-full md:row-span-2">
<ul class="flex flex-row w-full -mx-3 md:mx-0 text-base justify-between sm:justify-start sm:gap-x-4 lg:gap-x-6 md:justify-end">
<li class="inline md:m-0 md:block">
<a href="https://www.facebook.com/FlowFuse/" class="block px-3 py-3 md:p-0">
<span class="sr-only">Visit our Facebook page</span>
{% include "components/facebook.njk" %}
</a>
</li>
<li class="inline md:m-0 md:block">
<a href="https://www.linkedin.com/company/flowfuse" class="block px-3 py-3 md:p-0">
<span class="sr-only">Visit our LinkedIn page</span>
{% include "components/linkedin.njk" %}
</a>
</li>
<li class="inline md:m-0 md:block">
<a href="https://www.youtube.com/channel/UCbBzP8NZbv3WDtlt4UouA-g" class="block px-3 py-3 md:p-0">
<span class="sr-only">Visit our YouTube channel</span>
{% include "components/youtube.njk" %}
</a>
</li>
<li class="inline md:m-0 md:block">
<a href="https://twitter.com/FlowFuseInc" class="block px-3 py-3 md:p-0">
<span class="sr-only">Visit our Twitter page</span>
{% include "components/twitter.njk" %}
</a>
</li>
<li class="inline md:m-0 md:block">
<a href="https://github.com/FlowFuse" class="block px-3 py-3 md:p-0">
<span class="sr-only">Visit our GitHub page</span>
{% include "components/github.njk" %}
</a>
</li>
<li class="inline md:m-0 md:block">
<a href="https://discord.gg/2RrvW8dkrF" class="block px-3 py-3 md:p-0">
<span class="sr-only">Join our Discord</span>
{% include "components/discord.njk" %}
</a>
</li>
<li class="inline md:m-0 md:block">
<a href="/blog/index.xml" class="block px-3 py-3 md:p-0">
<span class="sr-only">Subscribe to our RSS feed</span>
{% include "components/rss.njk" %}
</a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</body>
<script>
document.getElementById('nav-toggle').onclick = function(){
// self
document.getElementById("nav-toggle").classList.toggle("mobile-open");
let classes = document.getElementById("ff-header").classList;
classes.toggle("mobile-open");
}
</script>
<!-- Youtube Facade -->
<script async src="https://cdn.jsdelivr.net/npm/lite-youtube-embed@0.2.0/src/lite-yt-embed.min.js"></script>
<link rel="preload" href="https://cdn.jsdelivr.net/npm/lite-youtube-embed@0.2.0/src/lite-yt-embed.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin="anonymous" referrerpolicy="no-referrer" />
{%- if not DEV_MODE -%}
<!-- PostHog -->
<script type="text/javascript">
const getMyCookieValue = (name) => (
document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)')?.pop() || ''
)
function decodeCookie (cookie) {
return JSON.parse(decodeURIComponent(cookie))
}
var phBootstrap = {}
if (!!(getMyCookieValue("ff-distinctid"))) {
phBootstrap['distinctID'] = getMyCookieValue("ff-distinctid")
}
if (!!(getMyCookieValue("ff-feats"))) {
phBootstrap['featureFlags'] = decodeCookie(getMyCookieValue("ff-feats"))
} else {
console.log("No feature flags found - falling back to 'control' content")
}
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init('{{ POSTHOG_APIKEY }}', {
api_host:'https://eu.posthog.com',
bootstrap: phBootstrap,
capture_pageleave: false,
opt_out_capturing_by_default: true
})
/*
Custom pageleave handler to track scroll
*/
// when the page first loads, how much content can the visitor see?
const NO_SCROLL_HEIGHT = Math.min(1, (window.innerHeight + window.pageYOffset)/document.body.offsetHeight)
// what's the maximum amount of content they've seen so far?
var MAX_CONTENT_VIEWED = Math.min(1, (window.innerHeight + window.pageYOffset)/document.body.offsetHeight)
addEventListener("scroll", (event) => {
// Math.min here catches an oddity where sometimes this creeps over 1
const contentViewed = Math.min(1, (window.innerHeight + window.pageYOffset)/document.body.offsetHeight)
// Have they viewed more content than they've seen prior?
if (contentViewed > MAX_CONTENT_VIEWED) {
MAX_CONTENT_VIEWED = contentViewed
}
});
function emitPageLeave () {
// viewed:
// min: the content shown on pageload
// max: 1
// gives a decimal value from 0 -> 1 of the
// amount of content visible to the user within
// the pageview before they leave
var viewed
// scrolled:
// scale these value to exist between 0 and 1
// 0 -> Didn't scroll, just viewed the page as it loaded
// 1 -> Scrolled all the way to the bottom
var scrolled
if (NO_SCROLL_HEIGHT === 1) {
// didn't need to scroll, so they've seen everything
viewed = 1
// couldn't scroll, so set to 0
scrolled = 0
} else {
viewed = MAX_CONTENT_VIEWED
scrolled = (MAX_CONTENT_VIEWED - NO_SCROLL_HEIGHT) / (1 - NO_SCROLL_HEIGHT)
}
capture('$pageleave', {
content_scrolled: scrolled,
content_viewed: viewed
})
}
window.addEventListener &&
window.addEventListener('onpagehide' in self ? 'pagehide' : 'unload', emitPageLeave)
/*
Get User Agent String
*/
const phUA = {
"user_agent_string": window.navigator.userAgent
}
posthog.register(phUA)
function capture (eventName, props) {
if (posthog) {
posthog.capture(eventName, props);
}
}
</script>
<!-- PostHog - cookie banner update -->
<script type="text/plain" data-category="analytics">
posthog.opt_in_capturing();
</script>
<script type="text/plain" data-category="!analytics">
posthog.opt_out_capturing();
</script>
<!-- Clearbit Tracking -->
<script type="text/plain" data-category="analytics" async src="https://tag.clearbitscripts.com/v1/pk_a40db34c3e210290335fe7ad7f2a7197/tags.js" referrerpolicy="strict-origin-when-cross-origin"></script>
<!-- HubSpot Tracking -->
{% set hubspotJS %}{% include "hubspot.js" %}{% endset %}
<script>{{ hubspotJS | jsmin | safe }}</script>
<!-- Cookie banner -->
<script async type="text/javascript" src="/js/cc.min.js"></script>
<!-- HS script -->
<script async type="text/javascript" id="hs-script-loader" src="//js-eu1.hs-scripts.com/26586079.js"></script>
<!-- HubSpot Consent Listener -->
<script type="text/javascript">
function addHubSpotConsentListener() {
var _hsp = window._hsp = window._hsp || [];
_hsp.push(['addPrivacyConsentListener', function(consent) {
// Check if the HubSpot cookie banner is enabled
var isBannerEnabled = document.querySelector('#hs-banner-parent') !== null;
if (isBannerEnabled) {
if (CookieConsent.acceptedCategory('analytics')) {
// The user has accepted analytics cookies
// Enable HubSpot analytics cookies
consent.categories.analytics = true;
} else {
// The user has rejected analytics cookies
// Disable HubSpot analytics cookies
consent.categories.analytics = false;
}
if (CookieConsent.acceptedCategory('ads')) {
// The user has accepted ads cookies
// Enable HubSpot ads cookies
consent.categories.advertisement = true;
} else {
// The user has rejected ads cookies
// Disable HubSpot ads cookies
consent.categories.advertisement = false;
}
// Enable HubSpot functionality cookies by default
consent.categories.functionality = true;
}
}]);
}
window.addEventListener('load', (event) => {
addHubSpotConsentListener();
});
</script>
{%- endif -%}
</html>