
// === Google Analytics 4 (Veriqo Studio - Apr 2026) ===
function rbn_add_ga4_tracking() {
    echo '<!-- Google tag (gtag.js) -->' . "\n";
    echo '<script async src="https://www.googletagmanager.com/gtag/js?id=G-NGNHSYDFB2"></script>' . "\n";
    echo '<script>' . "\n";
    echo 'window.dataLayer = window.dataLayer || [];' . "\n";
    echo 'function gtag(){dataLayer.push(arguments);}' . "\n";
    echo 'gtag("js", new Date());' . "\n";
    echo 'gtag("config", "G-NGNHSYDFB2");' . "\n";
    echo '</script>' . "\n";
}
add_action( 'wp_head', 'rbn_add_ga4_tracking', 1 );
// === GA4 Key Event Tracking (Veriqo Studio - Apr 2026) ===
function rbn_add_ga4_events() {
    echo '<script>' . "\n";
    echo 'document.addEventListener("click", function(e) {' . "\n";
    echo '  var link = e.target.closest("a[href^=\'tel:\']");' . "\n";
    echo '  if (link) {' . "\n";
    echo '    var num = link.getAttribute("href").replace("tel:", "");' . "\n";
    echo '    gtag("event", "phone_click", {' . "\n";
    echo '      phone_number: num,' . "\n";
    echo '      link_text: link.textContent.trim(),' . "\n";
    echo '      page_location: window.location.pathname' . "\n";
    echo '    });' . "\n";
    echo '  }' . "\n";
    echo '});' . "\n";
    echo 'window.addEventListener("message", function(e) {' . "\n";
    echo '  if (e.data && e.data.type === "hsFormCallback" && e.data.eventName === "onFormSubmitted") {' . "\n";
    echo '    gtag("event", "form_submit", {' . "\n";
    echo '      form_id: e.data.id || "hubspot",' . "\n";
    echo '      form_type: "hubspot",' . "\n";
    echo '      page_location: window.location.pathname' . "\n";
    echo '    });' . "\n";
    echo '  }' . "\n";
    echo '});' . "\n";
    echo '</script>' . "\n";
}
add_action( 'wp_footer', 'rbn_add_ga4_events', 99 );
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//rbninsurance.com/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://rbninsurance.com/post-sitemap.xml</loc>
		<lastmod>2026-04-28T18:56:24+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://rbninsurance.com/page-sitemap.xml</loc>
		<lastmod>2026-04-10T20:00:41+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://rbninsurance.com/services-sitemap.xml</loc>
		<lastmod>2026-04-17T16:53:13+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://rbninsurance.com/case-study-sitemap.xml</loc>
		<lastmod>2022-02-08T16:41:21+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://rbninsurance.com/news-sitemap.xml</loc>
		<lastmod>2022-02-08T19:41:38+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://rbninsurance.com/category-sitemap.xml</loc>
		<lastmod>2026-04-28T18:56:24+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->