Skip to content

Commit 5d66142

Browse files
committed
updated subdomain path for tag
1 parent f53ac86 commit 5d66142

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ function thumbUrl(video) {
123123
function render(forceAutoplay) {
124124
const hash = location.hash.slice(1); // e.g. /product/crm/video/crm-1
125125
if (typeof gtag === 'function') {
126+
const basePath = location.pathname.replace(/\/$/, '');
127+
const cleanHash = location.hash.replace(/^#\/?/, '');
128+
const customPath = basePath + (cleanHash ? '/' + cleanHash : '/');
126129
gtag('config', 'G-CZKRW5KJRS', {
127130
page_path: location.pathname + location.search + location.hash
128131
});

0 commit comments

Comments
 (0)