fix: change backtick to regular after making script loading less hacky
| | |
| | | staticResources: StaticResources, |
| | | ): StaticResources { |
| | | const contentIndexPath = joinSegments(baseDir, "static/contentIndex.json") |
| | | const contentIndexScript = `const fetchData = fetch(\`${contentIndexPath}\`).then(data => data.json())` |
| | | const contentIndexScript = `const fetchData = fetch("${contentIndexPath}").then(data => data.json())` |
| | | |
| | | return { |
| | | css: [joinSegments(baseDir, "index.css"), ...staticResources.css], |
| | |
| | | componentResources.afterDOMLoaded.push(` |
| | | window.dataLayer = window.dataLayer || []; |
| | | function gtag() { dataLayer.push(arguments); } |
| | | gtag(\`js\`, new Date()); |
| | | gtag(\`config\`, \`${tagId}\`, { send_page_view: false }); |
| | | gtag("js", new Date()); |
| | | gtag("config", "${tagId}", { send_page_view: false }); |
| | | |
| | | document.addEventListener(\`nav\`, () => { |
| | | gtag(\`event\`, \`page_view\`, { |
| | | document.addEventListener("nav", () => { |
| | | gtag("event", "page_view", { |
| | | page_title: document.title, |
| | | page_location: location.href, |
| | | }); |