I am facing an issue (in IE): my url fragments (hash) will automatically add to the page title in my pageview (dt), but it only happens in IE.

I have used the setTimeout as below, but the pageview still has fragments in the title, but the virtual pageview will not have this issue, yeah, only the first pageview.

      window.document.title = MetaData.meta.title;
   }, 1000);

I am trying to determine if I can overwrite the default page title value in pageview or not. If it can, how?

1 Answer 1


Yes, it's possible to overwrite the page title. You just need to write a JS function to parse the title string (eg. split by #) and then to return that value into the "title" field in GTM:

enter image description here

  • if you want to overwrite the page path value you can do it similarly by setting the field page to the value of a custom JS function from GTM Apr 11, 2016 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.