### Google Tag Manager Initialization Source: https://www.sanalifeenergy.com/building-performance-standards/philadelphia-building-energy-performance-program-a-guide-for-compliance Initializes Google Tag Manager by asynchronously loading the GTM script into the page. This is crucial for website analytics and marketing tag management. ```javascript 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-596LT7Z'); ``` -------------------------------- ### Image Preload and Dimension Setting Source: https://www.sanalifeenergy.com/building-performance-standards/philadelphia-building-energy-performance-program-a-guide-for-compliance Optimizes image loading by preloading critical images and setting width/height attributes after they load. This improves perceived performance and prevents layout shifts. ```javascript requestAnimationFrame(() => { const images = [ { selector: 'img.cms-item-hero-image', preload: true, logLabel: 'LCP hero image' }, { selector: 'img.cms-item-preview-image', preload: false, logLabel: 'CMS preview image' } ]; images.forEach(({ selector, preload, logLabel }) => { const img = document.querySelector(selector); if (!img) return; const setDimensions = () => { img.setAttribute("width", img.naturalWidth.toString()); img.setAttribute("height", img.naturalHeight.toString()); console.log(`${logLabel} dimensions set: ${img.naturalWidth}×${img.naturalHeight}`); }; if (preload && img.src) { const preloadLink = document.createElement('link'); preloadLink.rel = 'preload'; preloadLink.as = 'image'; preloadLink.href = img.src; const ext = img.src.split('.').pop().toLowerCase(); preloadLink.type = ext === 'webp' ? 'image/webp' : ext === 'jpg' || ext === 'jpeg' ? 'image/jpeg' : 'image/png'; document.head.appendChild(preloadLink); } if (img.complete) { setDimensions(); } else { img.addEventListener("load", setDimensions); setTimeout(() => { if (img.naturalWidth && !img.hasAttribute("width")) { setDimensions(); } }, 200); } }); }); ``` -------------------------------- ### Subscription Initialization Script Source: https://www.sanalifeenergy.com/building-performance-standards/grand-rapids-building-performance-standards-a-compliance-guide-for-property-owners This JavaScript code initializes a subscription service, likely for news or articles, with specific configurations. It sets the content type, product association, and client options including theme and language. ```JavaScript (self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: "NewsArticle", isPartOfType: ["Product"], isPartOfProductId: "CAowleukCw:openaccess", clientOptions: { theme: "light", lang: "en" }, }); }); ``` -------------------------------- ### Preload and Set Image Dimensions Source: https://www.sanalifeenergy.com/building-performance-standards/savannah-100-percent-clean-energy-plan-a-guide-for-businesses-to-achieve-compliance This script optimizes image loading by preloading specific images and setting their dimensions after they load or after a short delay. It targets images with specific classes and logs their dimensions. ```javascript requestAnimationFrame(() => { const images = [ { selector: 'img.cms-item-hero-image', preload: true, logLabel: 'LCP hero image' }, { selector: 'img.cms-item-preview-image', preload: false, logLabel: 'CMS preview image' } ]; images.forEach(({ selector, preload, logLabel }) => { const img = document.querySelector(selector); if (!img) return; const setDimensions = () => { img.setAttribute("width", img.naturalWidth.toString()); img.setAttribute("height", img.naturalHeight.toString()); console.log(`${logLabel} dimensions set: ${img.naturalWidth}×${img.naturalHeight}`); }; if (preload && img.src) { const preloadLink = document.createElement('link'); preloadLink.rel = 'preload'; preloadLink.as = 'image'; preloadLink.href = img.src; const ext = img.src.split('.').pop().toLowerCase(); preloadLink.type = ext === 'webp' ? 'image/webp' : ext === 'jpg' || ext === 'jpeg' ? 'image/jpeg' : 'image/png'; document.head.appendChild(preloadLink); } if (img.complete) { setDimensions(); } else { img.addEventListener("load", setDimensions); setTimeout(() => { if (img.naturalWidth && !img.hasAttribute("width")) { setDimensions(); } }, 200); } }); }); ``` -------------------------------- ### External Link Handling and Subscription Initialization Source: https://www.sanalifeenergy.com/building-performance-standards/san-diego-building-performance-standards-a-guide-to-compliance-and-sustainability This JavaScript code enhances user experience by automatically opening external links in new tabs and initializes a subscription service for news articles with specified client options. ```javascript document.addEventListener("DOMContentLoaded", function () { // 1. If you're using a form with an element #insertpageurl, populate it var pageUrlInput = document.getElementById("insertpageurl"); if (pageUrlInput) { pageUrlInput.value = window.location.href; } // 2. Open all external links in a new tab var hostname = location.hostname; var links = document.querySelectorAll('a[href]:not([href^="/"]):not([href*="' + hostname + '"])'); links.forEach(function(link) { link.setAttribute("target", "_blank"); link.setAttribute("rel", "noreferrer"); }); }); (self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: "NewsArticle", isPartOfType: ["Product"], isPartOfProductId: "CAowleukCw:openaccess", clientOptions: { theme: "light", lang: "en" }, }); }); ``` -------------------------------- ### Image Preload and Dimension Setting Source: https://www.sanalifeenergy.com/building-performance-standards/montpelier-net-zero-action-plan-what-businesses-need-to-know This script optimizes image loading by setting dimensions for specified images and optionally preloading critical ones. It targets images with specific classes and logs their loading status and dimensions. ```javascript requestAnimationFrame(() => { const images = [ { selector: 'img.cms-item-hero-image', preload: true, logLabel: 'LCP hero image' }, { selector: 'img.cms-item-preview-image', preload: false, logLabel: 'CMS preview image' } ]; images.forEach(({ selector, preload, logLabel }) => { const img = document.querySelector(selector); if (!img) return; const setDimensions = () => { img.setAttribute("width", img.naturalWidth.toString()); img.setAttribute("height", img.naturalHeight.toString()); console.log(`${logLabel} dimensions set: ${img.naturalWidth}×${img.naturalHeight}`); }; if (preload && img.src) { const preloadLink = document.createElement('link'); preloadLink.rel = 'preload'; preloadLink.as = 'image'; preloadLink.href = img.src; const ext = img.src.split('.').pop().toLowerCase(); preloadLink.type = ext === 'webp' ? 'image/webp' : ext === 'jpg' || ext === 'jpeg' ? 'image/jpeg' : 'image/png'; document.head.appendChild(preloadLink); } if (img.complete) { setDimensions(); } else { img.addEventListener("load", setDimensions); setTimeout(() => { if (img.naturalWidth && !img.hasAttribute("width")) { setDimensions(); } }, 200); } }); }); ``` -------------------------------- ### Schema.org JSON-LD for BERDO Guide Source: https://www.sanalifeenergy.com/building-performance-standards/boston-building-emissions-reduction-and-disclosure-ordinance-a-guide-to-berdo Structured data in JSON-LD format, adhering to Schema.org vocabulary, to enhance search engine understanding of the page content related to the Boston BERDO ordinance. ```APIDOC { "@context": "https://schema.org", "@graph": [ { "@type": "WebPage", "@id": "https://www.sanalifeenergy.com/building-performance-standards/boston-building-emissions-reduction-and-disclosure-ordinance-a-guide-to-berdo#webpage", "name": "Boston Building Emissions Reduction And Disclosure Ordinance: A Guide to BERDO", "url": "https://www.sanalifeenergy.com/building-performance-standards/boston-building-emissions-reduction-and-disclosure-ordinance-a-guide-to-berdo", "isPartOf": { "@id": "https://www.sanalifeenergy.com/building-performance-standards#webpage" }, "breadcrumb": { "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.sanalifeenergy.com" }, { "@type": "ListItem", "position": 2, "name": "Building Performance Standards", "item": "https://www.sanalifeenergy.com/building-performance-standards" }, { "@type": "ListItem", "position": 3, "name": "Boston Building Emissions Reduction And Disclosure Ordinance: A Guide to BERDO", "item": "https://www.sanalifeenergy.com/building-performance-standards/boston-building-emissions-reduction-and-disclosure-ordinance-a-guide-to-berdo" } ] }, "about": [ { "@id": "#EnergyBenchmarking" }, { "@id": "#ComplianceDeadline" }, { "@id": "#EnforcementFine" }, { "@id": "#Sustainability" } ] }, { "@type": "Place", "@id": "https://www.wikidata.org/wiki/Q100", "name": "Boston", "address": { "@type": "PostalAddress", "addressLocality": "Boston", "addressRegion": "MA", "addressCountry": "US" }, "geo": { "@type": "GeoCoordinates", "latitude": "42.3601", "longitude": "-71.0589" } }, { "@type": [ "NewsArticle", "Legislation" ], "name": "Boston Building Emissions Reduction And Disclosure Ordinance: A Guide to BERDO", "headline": "Boston Building Emissions Reduction And Disclosure Ordinance: A" } ] } ``` -------------------------------- ### JavaScript DOM Manipulation and Subscription Init Source: https://www.sanalifeenergy.com/building-performance-standards/fort-collins-building-performance-standards-a-compliance-guide-for-property-owners Handles DOMContentLoaded events to populate a page URL input and open external links in new tabs. Also initializes SWG_BASIC for subscription management with specified client options. ```javascript document.addEventListener("DOMContentLoaded", function () { // 1. If you're using a form with an element #insertpageurl, populate it var pageUrlInput = document.getElementById("insertpageurl"); if (pageUrlInput) { pageUrlInput.value = window.location.href; } // 2. Open all external links in a new tab var hostname = location.hostname; var links = document.querySelectorAll('a\[href\]:not(\[href^="/"]):not(\[href*="' + hostname + '"])'); links.forEach(function(link) { link.setAttribute("target", "_blank"); link.setAttribute("rel", "noreferrer"); }); }); (self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: "NewsArticle", isPartOfType: ["Product"], isPartOfProductId: "CAowleukCw:openaccess", clientOptions: { theme: "light", lang: "en" } }); }); ``` -------------------------------- ### Evanston Healthy Buildings Ordinance Schema Source: https://www.sanalifeenergy.com/building-performance-standards/evanston-healthy-buildings-ordinance-a-compliance-guide-for-building-owners Structured data (JSON-LD) describing the Evanston Healthy Buildings Ordinance compliance guide. It includes article details, definitions of key terms, information about related software and services, and author details. ```APIDOC { "@context": "https://schema.org", "@graph": [ { "@type": "Article", "name": "Evanston Healthy Buildings Ordinance: A Compliance Guide for Building Owners", "description": "Learn about Evanston’s Healthy Buildings Ordinance, compliance deadlines, emissions reduction targets, and strategies for improving building efficiency. ", "datePublished": "Apr 11, 2025", "dateModified": "Apr 11, 2025", "url": "https://www.sanalifeenergy.com/building-performance-standards/evanston-healthy-buildings-ordinance-a-compliance-guide-for-building-owners", "image": { "@type": "ImageObject", "url": "https://cdn.prod.website-files.com/6681cf21236d3ea9104f03a9/682de379791b1bb6f7090713_Evanston%252C%2520Illinois%2520Building%2520Performance%2520Standards.jpeg" }, "legislationType": "City Ordinance", "mainEntityOfPage": { "@id": "https://www.sanalifeenergy.com/building-performance-standards/evanston-healthy-buildings-ordinance-a-compliance-guide-for-building-owners#webpage" }, "locationCreated": { "@id": "https://www.wikidata.org/wiki/Q462799" }, "keywords": "evanston healthy buildings ordinance, hbo compliance evanston, evanston building performance standards, energy efficiency evanston buildings, greenhouse gas reduction evanston, energy star portfolio manager evanston, electrification requirements evanston, renewable energy standards evanston, energy benchmarking evanston, evanston climate action plan, energy use intensity targets evanston, commercial building upgrades evanston, multifamily energy compliance evanston, pace financing evanston buildings, evanston sustainability goals", "author": { "@id": "#danielle-wasem" }, "publisher": { "@type": "Organization", "name": "Sanalife", "url": "https://www.sanalifeenergy.com", "logo": { "@type": "ImageObject", "url": "https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/66840ed524e4b24a7f4a2a9e_Logotype_RGB_Color.svg" } } }, { "@type": "DefinedTerm", "@id": "#EnergyBenchmarking", "name": "Energy Benchmarking", "description": "Annual reporting of building energy usage to improve transparency and performance.", "inDefinedTermSet": "https://www.sanalifeenergy.com/building-performance-standards#bps-terms" }, { "@type": "DefinedTerm", "@id": "#ComplianceDeadline", "name": "Compliance Deadline", "description": "The specific date by which a building must meet the performance requirements of a local ordinance.", "inDefinedTermSet": "https://www.sanalifeenergy.com/building-performance-standards#bps-terms" }, { "@type": "DefinedTerm", "@id": "#EnforcementFine", "name": "Enforcement Fine", "description": "A financial penalty imposed on building owners for non-compliance with energy performance laws.", "inDefinedTermSet": "https://www.sanalifeenergy.com/building-performance-standards#bps-terms" }, { "@type": "DefinedTerm", "@id": "#Sustainability", "name": "Sustainability", "description": "Practices that promote resource conservation, emissions reduction, and environmental stewardship over the long term.", "inDefinedTermSet": "https://www.sanalifeenergy.com/building-performance-standards#bps-terms" }, { "@type": "SoftwareApplication", "@id": "https://www.sanalifeenergy.com/energy-management-software#app", "name": "E360 Energy Management And BPS Compliance Software", "url": "https://www.sanalifeenergy.com/energy-management-software", "operatingSystem": "Web", "applicationCategory": "BusinessApplication", "description": "E360 is a web-based energy management platform providing compliance and monitoring tools for commercial building performance standards.", "offers": { "@type": "Offer", "url": "https://www.sanalifeenergy.com/energy-management-software", "availability": "https://schema.org/InStock", "price": "0", "priceCurrency": "USD" } }, { "@type": "Service", "@id": "https://www.sanalifeenergy.com/building-performance-standards#audit-service", "name": "Building Performance Compliance Audit Services", "url": "https://www.sanalifeenergy.com/building-performance-standards", "serviceType": "Building Energy Compliance", "description": "Evanston, Illinois Building Performance Compliance Audit Services", "provider": { "@type": "Organization", "name": "Sanalife", "url": "https://www.sanalifeenergy.com" }, "areaServed": { "@type": "Place", "name": "Evanston, Illinois", "@id": "https://www.wikidata.org/wiki/Q462799" } }, { "@type": "Person", "@id": "#danielle-wasem", "name": "Danielle Wasem", "givenName": "Danielle", "alternateName": "Wasem", "gender": "Female", "jobTitle": "Vice President of Marketing", "image": "https://global-uploads.webflow.com/638fbb1c57d5bcacf3536b6e/6466680eb30de776f0dea0a0_Danielle%20Wasem%20From%20Sanalife%20And%20F360.webp", "url": "https://www.sanalifeenergy.com/building-performance-standards/evanston-healthy-buildings-ordinance-a-compliance-guide-for-building-owners", "email": "dwasem@sanalife.io", "sameAs": [ "https://www.linkedin.com/in/daniellewasem/" ], "knowsLanguage": "English", "description": "Danielle specializes in translating complex topics like energy management, demand response, and building IoT into clear, engaging content. With a focus on sustainability and smart building technology, her writing e" } ] } ``` -------------------------------- ### BERDO Compliance Framework and Requirements Source: https://www.sanalifeenergy.com/building-performance-standards/boston-building-emissions-reduction-and-disclosure-ordinance-a-guide-to-berdo Details the core components of Boston's Building Emissions Reduction and Disclosure Ordinance (BERDO), including monitoring, reporting, emissions standards, enforcement, and penalties. This section guides building owners on their obligations and the consequences of non-compliance. ```APIDOC BERDO Compliance Framework: 1. Monitoring: - Description: Building owners must continually track energy and water consumption. - Recommendations: Invest in advanced metering systems or energy management tools to streamline data collection. 2. Reporting: - Description: Annually file reports detailing the building's energy and water usage. - Requirements: Data submission must be accurate and consistent, typically done through Boston's authorized platforms. 3. Emissions Standards: - Description: Compliance with emissions limits begins between 2025 and 2030, varying by building profile. - Requirements: Standards become progressively stringent, necessitating improvements in energy efficiency and potentially the adoption of renewable energy sources. 4. Enforcement: - Description: The city monitors compliance and conducts audits of submitted data. - Requirements: Maintaining precise records is crucial to secure against potential discrepancies during reviews. 5. Penalties: - Description: Non-compliance can result in financial penalties, including fines for inaccurate reporting or failure to meet emission standards. - Recommendation: Proactive management and meeting requirements is more cost-effective than incurring fines. ``` -------------------------------- ### Initialize Subscription Service and Handle External Links Source: https://www.sanalifeenergy.com/building-performance-standards/new-orleans-net-zero-by-2050-plan-what-businesses-need-to-know This JavaScript code initializes a subscription service for news articles and ensures all external links on the page open in a new tab with appropriate rel attributes. ```javascript document.addEventListener("DOMContentLoaded", function () { // 1. If you're using a form with an element #insertpageurl, populate it var pageUrlInput = document.getElementById("insertpageurl"); if (pageUrlInput) { pageUrlInput.value = window.location.href; } // 2. Open all external links in a new tab var hostname = location.hostname; var links = document.querySelectorAll('a\[href\]:not(\[href^="/"]):not(\[href*="' + hostname + '"])'); links.forEach(function(link) { link.setAttribute("target", "_blank"); link.setAttribute("rel", "noreferrer"); }); }); (self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: "NewsArticle", isPartOfType: ["Product"], isPartOfProductId: "CAowleukCw:openaccess", clientOptions: { theme: "light", lang: "en" }, }); }); ``` -------------------------------- ### Author Information Source: https://www.sanalifeenergy.com/building-performance-standards/san-diego-building-performance-standards-a-guide-to-compliance-and-sustainability Details about the author, Danielle Wasem, Vice President of Marketing at Sanalife, specializing in energy management content. ```APIDOC Person: name: Danielle Wasem givenName: Danielle alternateName: Wasem gender: Female jobTitle: Vice President of Marketing image: https://global-uploads.webflow.com/638fbb1c57d5bcacf3536b6e/6466680eb30de776f0dea0a0_Danielle%20Wasem%20From%20Sanalife%20And%20F360.webp url: https://www.sanalifeenergy.com/building-performance-standards/san-diego-building-performance-standards-a-guide-to-compliance-and-sustainability email: dwasem@sanalife.io sameAs: - https://www.linkedin.com/in/daniellewasem/ knowsLanguage: English description: Danielle specializes in translating complex topics like energy management, demand response, and building IoT into clear, engaging content. ``` -------------------------------- ### Author Information: Danielle Wasem Source: https://www.sanalifeenergy.com/building-performance-standards/nyc-local-law-88-your-guide-to-compliance-cost-savings-smarter-building-management Details about Danielle Wasem, Vice President of Marketing at Sanalife, specializing in energy management content. ```APIDOC Person: name: Danielle Wasem givenName: Danielle alternateName: Wasem gender: Female jobTitle: Vice President of Marketing image: https://global-uploads.webflow.com/638fbb1c57d5bcacf3536b6e/6466680eb30de776f0dea0a0_Danielle%20Wasem%20From%20Sanalife%20And%20F360.webp url: https://www.sanalifeenergy.com/building-performance-standards/nyc-local-law-88-your-guide-to-compliance-cost-savings-smarter-building-management email: dwasem@sanalife.io sameAs: - https://www.linkedin.com/in/daniellewasem/ knowsLanguage: English description: Danielle specializes in translating complex topics like energy management, demand response, and building IoT into clear, engaging content. With a focus on sustainability and smart building technology, her writing empowers audiences to understand the value of real-time energy data, optimize facility performance, and embrace green building practices. ``` -------------------------------- ### Subscription Initialization Script Source: https://www.sanalifeenergy.com/building-performance-standards/montgomery-county-building-energy-performance-standards-what-businesses-must-know This JavaScript snippet initializes a subscription service, likely for news articles or product updates. It configures the service with article type, product association, and client-side options like theme and language. ```javascript (self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: "NewsArticle", isPartOfType: ["Product"], isPartOfProductId: "CAowleukCw:openaccess", clientOptions: { theme: "light", lang: "en" }, }); }); ``` -------------------------------- ### Building Performance Compliance Audit Services Source: https://www.sanalifeenergy.com/building-performance-standards/nyc-local-law-88-your-guide-to-compliance-cost-savings-smarter-building-management Information on Building Performance Compliance Audit Services offered for New York City buildings. ```APIDOC Service: name: Building Performance Compliance Audit Services url: https://www.sanalifeenergy.com/building-performance-standards serviceType: Building Energy Compliance description: New York City, New York Building Performance Compliance Audit Services provider: name: Sanalife url: https://www.sanalifeenergy.com areaServed: name: New York City, New York ``` -------------------------------- ### Initialize Website JS and Touch Support Source: https://www.sanalifeenergy.com/building-performance-standards/portland-commercial-building-energy-performance-reporting-a-compliance-guide This script initializes JavaScript functionality for the website, adding 'w-mod-js' and 'w-mod-touch' classes to the document element based on browser capabilities. It's a common pattern for responsive web design. ```JavaScript (function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document)); ``` -------------------------------- ### Initialize DOM Classes Source: https://www.sanalifeenergy.com/building-performance-standards/montgomery-county-building-energy-performance-standards-what-businesses-must-know Adds 'w-mod-js' and 'w-mod-touch' classes to the documentElement based on browser capabilities. This helps in applying CSS styles conditionally. ```javascript (function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document)); ``` -------------------------------- ### E360 Energy Management Software Source: https://www.sanalifeenergy.com/building-performance-standards/nyc-local-law-88-your-guide-to-compliance-cost-savings-smarter-building-management Details of the E360 software, a web-based platform for energy management and Building Performance Standards (BPS) compliance. ```APIDOC SoftwareApplication: name: E360 Energy Management And BPS Compliance Software url: https://www.sanalifeenergy.com/energy-management-software operatingSystem: Web applicationCategory: BusinessApplication description: E360 is a web-based energy management platform providing compliance and monitoring tools for commercial building performance standards. offers: availability: https://schema.org/InStock price: "0" priceCurrency: USD ``` -------------------------------- ### NYC Local Law 88 Key Concepts Source: https://www.sanalifeenergy.com/building-performance-standards/nyc-local-law-88-your-guide-to-compliance-cost-savings-smarter-building-management Definitions of key terms related to NYC Local Law 88 compliance, energy management, and sustainability. ```APIDOC DefinedTerm: EnergyBenchmarking: name: Energy Benchmarking description: Annual reporting of building energy usage to improve transparency and performance. inDefinedTermSet: https://www.sanalifeenergy.com/building-performance-standards#bps-terms ComplianceDeadline: name: Compliance Deadline description: The specific date by which a building must meet the performance requirements of a local ordinance. inDefinedTermSet: https://www.sanalifeenergy.com/building-performance-standards#bps-terms EnforcementFine: name: Enforcement Fine description: A financial penalty imposed on building owners for non-compliance with energy performance laws. inDefinedTermSet: https://www.sanalifeenergy.com/building-performance-standards#bps-terms Sustainability: name: Sustainability description: Practices that promote resource conservation, emissions reduction, and environmental stewardship over the long term. inDefinedTermSet: https://www.sanalifeenergy.com/building-performance-standards#bps-terms ``` -------------------------------- ### Image Preload and Dimension Setting Source: https://www.sanalifeenergy.com/building-performance-standards/new-orleans-net-zero-by-2050-plan-what-businesses-need-to-know This script optimizes image loading by preloading critical images (like LCP hero images) and setting width/height attributes on images once they are loaded. This improves perceived performance and prevents layout shifts. ```javascript requestAnimationFrame(() => { const images = [ { selector: 'img.cms-item-hero-image', preload: true, logLabel: 'LCP hero image' }, { selector: 'img.cms-item-preview-image', preload: false, logLabel: 'CMS preview image' } ]; images.forEach(({ selector, preload, logLabel }) => { const img = document.querySelector(selector); if (!img) return; const setDimensions = () => { img.setAttribute("width", img.naturalWidth.toString()); img.setAttribute("height", img.naturalHeight.toString()); console.log(`${logLabel} dimensions set: ${img.naturalWidth}×${img.naturalHeight}`); }; if (preload && img.src) { const preloadLink = document.createElement('link'); preloadLink.rel = 'preload'; preloadLink.as = 'image'; preloadLink.href = img.src; const ext = img.src.split('.').pop().toLowerCase(); preloadLink.type = ext === 'webp' ? 'image/webp' : ext === 'jpg' || ext === 'jpeg' ? 'image/jpeg' : 'image/png'; document.head.appendChild(preloadLink); } if (img.complete) { setDimensions(); } else { img.addEventListener("load", setDimensions); setTimeout(() => { if (img.naturalWidth && !img.hasAttribute("width")) { setDimensions(); } }, 200); } }); }); ``` -------------------------------- ### Author Information Source: https://www.sanalifeenergy.com/building-performance-standards/renos-energy-and-water-efficiency-program-a-compliance-guide-for-building-owners Details about the author, Danielle Wasem, Vice President of Marketing, specializing in energy management and smart building technology content. ```APIDOC Person: name: Danielle Wasem givenName: Danielle alternateName: Wasem gender: Female jobTitle: Vice President of Marketing image: https://global-uploads.webflow.com/638fbb1c57d5bcacf3536b6e/6466680eb30de776f0dea0a0_Danielle%20Wasem%20From%20Sanalife%20And%20F360.webp url: https://www.sanalifeenergy.com/building-performance-standards/renos-energy-and-water-efficiency-program-a-compliance-guide-for-building-owners email: dwasem@sanalife.io sameAs: - https://www.linkedin.com/in/daniellewasem/ knowsLanguage: English description: Danielle specializes in translating complex topics like energy management, demand response, and building IoT into clear, engaging content. With a focus on sustainability and smart building technology, her writing empowers audiences to understand the value of real-time energy data, optimize facility performance, and adopt future-ready solutions for more efficient, resilient buildings. ``` -------------------------------- ### Google Tag Manager Initialization Source: https://www.sanalifeenergy.com/building-performance-standards/montpelier-net-zero-action-plan-what-businesses-need-to-know This script initializes Google Tag Manager (GTM) by pushing a 'gtm.js' event. It dynamically loads the GTM script into the page, enabling website analytics and tag management. ```javascript (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-596LT7Z'); ``` -------------------------------- ### Google Tag Manager Initialization Source: https://www.sanalifeenergy.com/building-performance-standards/renos-energy-and-water-efficiency-program-a-compliance-guide-for-building-owners Initializes Google Tag Manager (GTM) by asynchronously loading the GTM script. This snippet ensures that analytics and marketing tags are correctly deployed and managed on the website. ```javascript (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-596LT7Z'); ``` -------------------------------- ### Website Initialization and Touch Detection Source: https://www.sanalifeenergy.com/building-performance-standards/berkeley-building-emissions-saving-ordinance-beso-compliance-guide-for-building-owners Initializes website functionality by adding 'w-mod-js' class to the document element and 'w-mod-touch' if touch support is detected. This script enhances website responsiveness based on device capabilities. ```javascript function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document); ``` -------------------------------- ### JavaScript Touch Detection Source: https://www.sanalifeenergy.com/building-performance-standards/philadelphia-building-energy-performance-program-a-guide-for-compliance Detects touch support on the user's device and adds corresponding classes to the HTML document's root element for conditional styling or behavior. ```javascript function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document); ``` -------------------------------- ### Google Tag Manager Initialization Source: https://www.sanalifeenergy.com/building-performance-standards/chicago-energy-benchmarking-ordinance-compliance-guide-for-building-owners This script initializes Google Tag Manager (GTM) by pushing a 'gtm.js' event and asynchronously loading the GTM script. It's a standard implementation for integrating GTM into a website. ```javascript (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-596LT7Z'); ``` -------------------------------- ### Building Performance Compliance Audit Services Source: https://www.sanalifeenergy.com/building-performance-standards/renos-energy-and-water-efficiency-program-a-compliance-guide-for-building-owners Information on Building Performance Compliance Audit Services offered for Reno, Nevada, focusing on building energy compliance. ```APIDOC Service: name: Building Performance Compliance Audit Services url: https://www.sanalifeenergy.com/building-performance-standards serviceType: Building Energy Compliance description: Reno, Nevada Building Performance Compliance Audit Services provider: name: Sanalife url: https://www.sanalifeenergy.com areaServed: name: Reno, Nevada ``` -------------------------------- ### Author Information: Danielle Wasem Source: https://www.sanalifeenergy.com/building-performance-standards/new-york-city-local-law-97-a-guide-to-compliance-and-energy-efficiency Details about Danielle Wasem, Vice President of Marketing, specializing in energy management and smart building technology content. ```APIDOC Person: @id: #danielle-wasem name: Danielle Wasem givenName: Danielle alternateName: Wasem gender: Female jobTitle: Vice President of Marketing image: https://global-uploads.webflow.com/638fbb1c57d5bcacf3536b6e/6466680eb30de776f0dea0a0_Danielle%20Wasem%20From%20Sanalife%20And%20F360.webp url: https://www.sanalifeenergy.com/building-performance-standards/new-york-city-local-law-97-a-guide-to-compliance-and-energy-efficiency email: dwasem@sanalife.io sameAs: - https://www.linkedin.com/in/daniellewasem/ knowsLanguage: English description: Danielle specializes in translating complex topics like energy management, demand response, and building IoT into clear, engaging content. With a focus on sustainability and smart building technology, her writing empowers audiences to understand the value of real-time energ ``` -------------------------------- ### Google Tag Manager Initialization Source: https://www.sanalifeenergy.com/building-performance-standards/milwaukee-building-performance-standards-what-businesses-need-to-know This script initializes Google Tag Manager (GTM) by pushing a 'gtm.js' event to the data layer and asynchronously loading the GTM script. It ensures that GTM is correctly set up for analytics and tracking purposes. ```javascript (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-596LT7Z'); ``` -------------------------------- ### Add Browser Capability Classes to HTML Source: https://www.sanalifeenergy.com/building-performance-standards/savannah-100-percent-clean-energy-plan-a-guide-for-businesses-to-achieve-compliance This script enhances accessibility and styling by adding 'w-js' and 'w-touch' classes to the `` element. It detects touch support, allowing for CSS-based adjustments. ```javascript function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document); ``` -------------------------------- ### Sanalife Subscription Initialization Source: https://www.sanalifeenergy.com/building-performance-standards/savannah-100-percent-clean-energy-plan-a-guide-for-businesses-to-achieve-compliance This snippet initializes Sanalife's basic subscription service, configuring it for a 'NewsArticle' type with specific product associations and client options like theme and language. ```javascript (self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: "NewsArticle", isPartOfType: ["Product"], isPartOfProductId: "CAowleukCw:openaccess", clientOptions: { theme: "light", lang: "en" }, }); }); ``` -------------------------------- ### Image Preloading and Dimension Setting Source: https://www.sanalifeenergy.com/building-performance-standards/renos-energy-and-water-efficiency-program-a-compliance-guide-for-building-owners Optimizes image loading by preloading critical images and setting their dimensions after they load or after a timeout. This improves perceived performance and prevents layout shifts, especially for LCP images. ```javascript requestAnimationFrame(() => { const images = [ { selector: 'img.cms-item-hero-image', preload: true, logLabel: 'LCP hero image' }, { selector: 'img.cms-item-preview-image', preload: false, logLabel: 'CMS preview image' } ]; images.forEach(({ selector, preload, logLabel }) => { const img = document.querySelector(selector); if (!img) return; const setDimensions = () => { img.setAttribute("width", img.naturalWidth.toString()); img.setAttribute("height", img.naturalHeight.toString()); console.log(`${logLabel} dimensions set: ${img.naturalWidth}×${img.naturalHeight}`); }; if (preload && img.src) { const preloadLink = document.createElement('link'); preloadLink.rel = 'preload'; preloadLink.as = 'image'; preloadLink.href = img.src; const ext = img.src.split('.').pop().toLowerCase(); preloadLink.type = ext === 'webp' ? 'image/webp' : ext === 'jpg' || ext === 'jpeg' ? 'image/jpeg' : 'image/png'; document.head.appendChild(preloadLink); } if (img.complete) { setDimensions(); } else { img.addEventListener("load", setDimensions); setTimeout(() => { if (img.naturalWidth && !img.hasAttribute("width")) { setDimensions(); } }, 200); } }); }); ``` -------------------------------- ### Website Styling for Slider and Lightbox Source: https://www.sanalifeenergy.com/building-performance-standards/savannah-100-percent-clean-energy-plan-a-guide-for-businesses-to-achieve-compliance CSS rules to style slider dots (active and inactive states) and the lightbox backdrop. These styles control the visual appearance of interactive elements on the website. ```css .w-slider-dot { background: #93a9be; } .w-slider-dot.w-active { background: #133b62; } .w-lightbox-backdrop { background: rgba(19, 59, 98, 0.95) !important; } ``` -------------------------------- ### Initialize Google Tag Manager Source: https://www.sanalifeenergy.com/building-performance-standards/annapolis-building-performance-standards-a-compliance-guide-for-businesses This snippet initializes Google Tag Manager (GTM) by creating a dataLayer and asynchronously loading the GTM script. It ensures that analytics and marketing tags are correctly deployed and managed on the website. ```javascript (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-596LT7Z'); ``` -------------------------------- ### Navigation Links and Image Assets Source: https://www.sanalifeenergy.com/building-performance-standards/oregon-building-performance-standard-a-practical-guide-for-building-owners Provides HTML structure for website navigation, including links to Home, About, and Solutions sections. It also includes image assets for logos and dropdown toggles, indicating a structured web page layout. ```html [![Sanalife Logotype (Dark Version)](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/66840ed524e4b24a7f4a2a9e_Logotype_RGB_Color.svg)![Sanalife Logotype (Light Version)](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/66840ed4c16c735c00faadb1_Logotype_RGB_White.svg)](/) [Home](/) About ![Sanalife Dropdown Toggle Green](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/6681cf21236d3ea9104f0375_Dropdown%20Toggles_Green.svg) [ ![Sanalife Energy Logo](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/6681cf21236d3ea9104f090f_Logo_RGB_Color.svg) About Sanalife & E360 Read about Sanalife's company story and our mission for sustainable and healthy building solutions. ](/about) [ ![Sanalife Partnerships](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/67dc6fbdb5083c82b1132544_Partnerships.svg) Partner Program Learn how Sanalife's partnership program can help grow your business product offerings and community impact. ](/partners) Solutions ![Sanalife Dropdown Toggle Green](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/6681cf21236d3ea9104f0375_Dropdown%20Toggles_Green.svg) [ ![E360 Logo & Brand Mark (Dark Version)](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/66840d6f67012d596c5919f0_Logo_RGB_Color.svg) E360 Energy Management Complete smart energy, building, and air quality management platform. ](/energy-management-software) [ ![E360 Building Automation System](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/67d38226138a96a543b344dd_Software%20Icons_Building%20Automation.svg) Building Automation Universal connected IoT solution for building scheduling and automation. ](/energy-management-software/building-automation-system) [ ![E360 Measurement And Verification](https://cdn.prod.website-files.com/6681cf21236d3ea9104f0369/67d38226fa83403e74d4c04a_Software%20Icons_Measurement%20And%20Verification.svg) ML-Powered M&V Simplified and ML-powered measurement and verification (M&V) reporting. ](/energy-monitoring-software/measurement-and-verification) ``` -------------------------------- ### Slider and Lightbox Styling Source: https://www.sanalifeenergy.com/building-performance-standards/nyc-local-law-88-your-guide-to-compliance-cost-savings-smarter-building-management This CSS defines styles for slider dots and the lightbox backdrop. It sets background colors for active and inactive slider dots, and a semi-transparent dark background for the lightbox overlay. ```css .w-slider-dot { background: #93a9be; } .w-slider-dot.w-active { background: #133b62; } .w-lightbox-backdrop { background: rgba(19, 59, 98, 0.95) !important; } ```