Skip to content

Commit f53ac86

Browse files
committed
added tag across domains and subdomains
1 parent f12852b commit f53ac86

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ function thumbUrl(video) {
121121
}
122122

123123
function render(forceAutoplay) {
124-
if (typeof gtag === 'function') {
124+
const hash = location.hash.slice(1); // e.g. /product/crm/video/crm-1
125+
if (typeof gtag === 'function') {
125126
gtag('config', 'G-CZKRW5KJRS', {
126127
page_path: location.pathname + location.search + location.hash
127128
});
128129
}
129-
const hash = location.hash.slice(1); // e.g. /product/crm/video/crm-1
130130
const parts = hash.split("/").filter(Boolean);
131131
const isHome = parts.length === 0 || parts[0] !== "product";
132132
document.querySelector(".navbar").classList.toggle("is-home", isHome);

0 commit comments

Comments
 (0)