AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.2K members online now
2.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

After # deletion on PDF file when Cross domain tracking

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi. I am doing cross domain tracking with google tag manager.

 

I can't delete the # and after # number on PDF file.

I could remove it on html page through implementing the following custom html.

 

<script>
 
function hashclear() {
if (location.hash && location.hash.match(/(#|&)(_ga)=.+/)){
  if ('replaceState' in history)
    history.replaceState('', document.title, location.pathname + location.search);
  else window.location.hash = '';
}
}
setTimeout("hashclear()", 100);
 
</script>
 

 

Is there any way to delete after # on PDF page?

I hope someone can help.