<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://toknavgnss.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://toknavgnss.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://toknavgnss.com/wp-sitemap-posts-page-1.xml</loc></sitemap></sitemapindex>
		<script id="toknav-meta-pixel">
		(function (window, document, config) {
			'use strict';
			if (window.__TOKNAV_META_PIXEL_RUNTIME__) { return; }
			window.__TOKNAV_META_PIXEL_RUNTIME__ = true;

			var CONSENT_KEY = 'toknav_marketing_consent';
			var CONSENT_MAX_AGE = 60 * 60 * 24 * 180;
			var pageViewSent = false;
			var viewContentSent = false;
			var handlersBound = false;
			var consentBanner;

			function safeStorageGet(key) {
				try { return window.localStorage.getItem(key); } catch (error) { return null; }
			}

			function safeStorageSet(key, value) {
				try { window.localStorage.setItem(key, value); } catch (error) { /* Cookie remains available. */ }
			}

			function cookieValue(name) {
				var encoded = encodeURIComponent(name) + '=';
				var values = document.cookie ? document.cookie.split(';') : [];
				for (var index = 0; index < values.length; index += 1) {
					var value = values[index].replace(/^\s+/, '');
					if (value.indexOf(encoded) === 0) { return decodeURIComponent(value.slice(encoded.length)); }
				}
				return null;
			}

			function setCookie(name, value) {
				document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) + '; path=/; max-age=' + CONSENT_MAX_AGE + '; SameSite=Lax; Secure';
			}

			function externalConsent() {
				if (window.Cookiebot && window.Cookiebot.consent && typeof window.Cookiebot.consent.marketing === 'boolean') {
					return window.Cookiebot.consent.marketing ? 'granted' : 'denied';
				}
				var cookieYes = cookieValue('cookieyes-consent');
				if (cookieYes) {
					if (/(?:advertisement|marketing):yes/i.test(cookieYes)) { return 'granted'; }
					if (/(?:advertisement|marketing):no/i.test(cookieYes)) { return 'denied'; }
				}
				var cookieBot = cookieValue('CookieConsent');
				if (cookieBot) {
					try {
						var parsed = JSON.parse(cookieBot);
						if (typeof parsed.marketing === 'boolean') { return parsed.marketing ? 'granted' : 'denied'; }
					} catch (error) { /* A non-JSON Cookiebot value is not a decision. */ }
				}
				return null;
			}

			function storedConsent() {
				return externalConsent() || safeStorageGet(CONSENT_KEY) || cookieValue(CONSENT_KEY);
			}

			function marketingAllowed() {
				return storedConsent() === 'granted';
			}

			function setConsent(value) {
				safeStorageSet(CONSENT_KEY, value);
				setCookie(CONSENT_KEY, value);
				if (value === 'granted') {
					ensurePixel();
					trackConfirmedP0Lead();
				}
				if (consentBanner) { consentBanner.hidden = true; }
			}

			function ensurePixel() {
				if (!marketingAllowed()) { return; }
				if (!window.fbq) {
					var fbq = function () { fbq.callMethod ? fbq.callMethod.apply(fbq, arguments) : fbq.queue.push(arguments); };
					fbq.queue = [];
					fbq.loaded = true;
					fbq.version = '2.0';
					window.fbq = fbq;
					window._fbq = fbq;
				}
				if (!document.getElementById('toknav-meta-pixel-library')) {
					var script = document.createElement('script');
					script.id = 'toknav-meta-pixel-library';
					script.async = true;
					script.src = 'https://connect.facebook.net/en_US/fbevents.js';
					document.head.appendChild(script);
				}
				if (window.__TOKNAV_META_PIXEL_INITIALISED__) { return; }
				window.__TOKNAV_META_PIXEL_INITIALISED__ = true;
				window.fbq('consent', 'grant');
				window.fbq('init', config.pixelId);
				trackPageView();
				trackViewContent();
			}

			function track(eventName, parameters) {
				if (!marketingAllowed()) { return; }
				ensurePixel();
				if (typeof window.fbq === 'function') { window.fbq('track', eventName, parameters || {}); }
			}

			function headingText() {
				var heading = document.querySelector('main h1, article h1, h1');
				return heading ? heading.textContent.replace(/\s+/g, ' ').trim() : document.title.replace(/\s*[|–-].*$/, '').trim();
			}

			function pagePath() {
				return (window.location.pathname || '/').replace(/\/+$/, '/') || '/';
			}

			function isViewContentPage(path) {
				return /^\/(?:[a-z]{2}\/)?(?:gnss-receiver|rtk-gnss|products|solution|application)(?:\/|$)/i.test(path);
			}

			function productCategory(path) {
				if (/rtk/i.test(path)) { return 'RTK'; }
				if (/gnss/i.test(path)) { return 'GNSS'; }
				return 'Survey Equipment';
			}

			function trackPageView() {
				if (pageViewSent) { return; }
				pageViewSent = true;
				track('PageView');
			}

			function trackViewContent() {
				var path = pagePath();
				if (viewContentSent || !isViewContentPage(path)) { return; }
				viewContentSent = true;
				track('ViewContent', { content_name: headingText(), content_category: productCategory(path) });
			}

			function oncePerPage(key, callback) {
				var storageKey = 'toknav_meta_page_' + key;
				if (safeStorageGet(storageKey) === pagePath()) { return; }
				safeStorageSet(storageKey, pagePath());
				callback();
			}

			function leadOnce(key, callback) {
				var storageKey = 'toknav_meta_lead_' + key;
				if (safeStorageGet(storageKey)) { return; }
				safeStorageSet(storageKey, '1');
				callback();
			}

			function formKey(form) {
				if (!form) { return 'website-inquiry'; }
				return (form.id || form.getAttribute('name') || form.getAttribute('aria-label') || form.className || 'website-inquiry').toString().replace(/\s+/g, '-').slice(0, 120);
			}

			function isContactPage() {
				return /\/(?:[a-z]{2}\/)?(?:contact|contact-us|inquiry|request-a-quote)(?:\/|$)/i.test(pagePath());
			}

			function trackLead(form, source) {
				var key = pagePath() + ':' + formKey(form) + ':' + source;
				leadOnce(key, function () {
					track('Lead', {
						content_name: headingText(),
						content_category: 'GNSS / RTK / Survey Equipment',
						form_source: source,
						page_path: pagePath()
					});
				});
			}

			function hasConfirmedP0Lead() {
				if (typeof window.URLSearchParams === 'function') {
					return new window.URLSearchParams(window.location.search).get('toknav_p0_inquiry') === 'received';
				}
				return /(?:^|[?&])toknav_p0_inquiry=received(?:&|$)/.test(window.location.search || '');
			}

			function trackConfirmedP0Lead() {
				if (hasConfirmedP0Lead()) { trackLead(null, 'toknav-p0-confirmed-form'); }
			}

			function bindTracking() {
				if (handlersBound) { return; }
				handlersBound = true;
				document.addEventListener('click', function (event) {
					var link = event.target.closest ? event.target.closest('a') : null;
					if (!link) { return; }
					var href = (link.getAttribute('href') || '').toLowerCase();
					var type = /^(?:mailto:)/.test(href) ? 'Email' : (/wa\.me|whatsapp\.com|api\.whatsapp\.com/.test(href) ? 'WhatsApp' : '');
					if (!type) { return; }
					oncePerPage('contact_' + type + '_' + (link.href || href), function () {
						track('Contact', { content_name: type + ' contact', content_category: 'GNSS / RTK / Survey Equipment' });
					});
				});
				document.addEventListener('submit', function (event) {
					var form = event.target;
					if (!isContactPage() || !form || !form.querySelector || !form.querySelector('input, textarea, select')) { return; }
					oncePerPage('contact_form_' + formKey(form), function () {
						track('Contact', { content_name: 'Contact form submitted', content_category: 'GNSS / RTK / Survey Equipment' });
					});
				}, true);
				document.addEventListener('wpcf7mailsent', function (event) { trackLead(event.target || null, 'contact-form-7'); });
				document.addEventListener('fluentform_submission_success', function (event) { trackLead(event.target || null, 'fluent-forms'); });
				document.addEventListener('toknav:lead-success', function (event) { trackLead(event.detail && event.detail.form ? event.detail.form : null, 'toknav-confirmed-form'); });
				if (window.jQuery) {
					window.jQuery(document).on('submit_success', function (event) { trackLead(event && event.target ? event.target : null, 'elementor'); });
					window.jQuery(document).on('gform_confirmation_loaded', function (event, formId) { trackLead(document.getElementById('gform_' + String(formId || '')) || null, 'gravity-forms'); });
				}
			}

			function showBanner() {
				if (consentBanner || document.getElementById('toknav-meta-consent')) { return; }
				consentBanner = document.createElement('section');
				consentBanner.id = 'toknav-meta-consent';
				consentBanner.setAttribute('role', 'region');
				consentBanner.setAttribute('aria-label', 'Marketing cookie preferences');
				consentBanner.innerHTML = '<div class="toknav-meta-consent__copy"><strong>Marketing measurement</strong><p>TOKNAV uses Meta Pixel only if you allow marketing cookies. It helps us measure website enquiries without sending form-field content.</p><a href="' + config.privacyUrl + '">Privacy policy</a></div><div class="toknav-meta-consent__actions"><button type="button" data-toknav-consent="denied">Use essential only</button><button type="button" data-toknav-consent="granted">Allow marketing cookies</button></div>';
				document.body.appendChild(consentBanner);
				consentBanner.addEventListener('click', function (event) {
					var button = event.target.closest ? event.target.closest('[data-toknav-consent]') : null;
					if (button) { setConsent(button.getAttribute('data-toknav-consent')); }
				});
			}

			function injectStyles() {
				if (document.getElementById('toknav-meta-consent-style')) { return; }
				var style = document.createElement('style');
				style.id = 'toknav-meta-consent-style';
				style.textContent = '#toknav-meta-consent{position:fixed;z-index:2147483647;right:18px;bottom:18px;max-width:520px;padding:18px;background:#102236;color:#fff;border-radius:12px;box-shadow:0 12px 36px rgba(0,0,0,.28);font:14px/1.5 system-ui,sans-serif}#toknav-meta-consent strong{font-size:16px}#toknav-meta-consent p{margin:6px 0}#toknav-meta-consent a{color:#b9e6ff}.toknav-meta-consent__actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.toknav-meta-consent__actions button{border:1px solid #c8d7e6;border-radius:6px;padding:9px 12px;background:transparent;color:#fff;font:inherit;cursor:pointer}.toknav-meta-consent__actions button[data-toknav-consent="granted"]{background:#1e88d8;border-color:#1e88d8}@media(max-width:640px){#toknav-meta-consent{right:10px;bottom:10px;left:10px;max-width:none}}';
				document.head.appendChild(style);
			}

			function start() {
				injectStyles();
				bindTracking();
				if (marketingAllowed()) {
					ensurePixel();
					trackConfirmedP0Lead();
				} else if (storedConsent() !== 'denied') { showBanner(); }
			}

			window.addEventListener('CookiebotOnAccept', function () { setConsent('granted'); });
			window.addEventListener('CookiebotOnDecline', function () { setConsent('denied'); });
			if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', start); } else { start(); }
		}(window, document, {"pixelId":"1430087362210873","privacyUrl":"https:\/\/toknavgnss.com\/privacy-policy\/"}));
		</script>
		