(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-KGPP3HKG');
adroll_adv_id = "EVXIB73AARGHNPP4ECTYSD";
adroll_pix_id = "BB6RS6QHGRC6FHLCSU6LE4";
adroll_version = "2.0";
(function(w, d, e, o, a) {
w.__adroll_loaded = true;
w.adroll = w.adroll || [];
w.adroll.f = [ 'setProperties', 'identify', 'track', 'identify_email' ];
var roundtripUrl = "https://s.adroll.com/j/" + adroll_adv_id
+ "/roundtrip.js";
for (a = 0; a < w.adroll.f.length; a++) {
w.adroll[w.adroll.f[a]] = w.adroll[w.adroll.f[a]] || (function(n) {
return function() {
w.adroll.push([ n, arguments ])
}
})(w.adroll.f[a])
}
e = d.createElement('script');
o = d.getElementsByTagName('script')[0];
e.async = 1;
e.src = roundtripUrl;
o.parentNode.insertBefore(e, o);
})(window, document);
adroll.track("pageView");
// Function to get the current URL
function getCurrentUrl() {
return window.location.href;
}
// Function to generate and add the alternate hreflang link tags
function addAlternateHreflang() {
// Get the current URL
var currentUrl = getCurrentUrl();
// Extract the path from the current URL
var url = new URL(currentUrl);
var path = url.pathname;
// Create the English link element
var linkEn = document.createElement('link');
linkEn.rel = 'alternate';
linkEn.hreflang = 'en';
linkEn.href = 'https://autoglassamerica.com' + path;
// Create the Spanish link element
var linkEs = document.createElement('link');
linkEs.rel = 'alternate';
linkEs.hreflang = 'es';
linkEs.href = 'https://espanol.autoglassamerica.com' + path;
// Add the link elements to the head of the document
document.head.appendChild(linkEn);
document.head.appendChild(linkEs);
}
// Call the function when the page loads
window.onload = addAlternateHreflang;
!function(){var n=document.createElement('script');n.crossOrigin='anonymous',n.async='async',n.src='https://tracking-cdn.figpii.com/dfd0ca3982ec98a375e6a20d87090814.js',document.head.append(n),window._fpEvent=window._fpEvent||[]}();
function initEmbeddedMessaging() {
try {
embeddedservice_bootstrap.settings.language = 'en_US'; // For example, enter 'en' or 'en-US'
embeddedservice_bootstrap.init(
'00D6A000001hZYK',
'Chat_Bot_AGA',
'https://nuvisionag.my.site.com/ESWChatBotAGA1733238704287',
{
scrt2URL: 'https://nuvisionag.my.salesforce-scrt.com'
}
);
} catch (err) {
console.error('Error loading Embedded Messaging: ', err);
}
};