usnistgov / oar-pdr

The NIST Open Access to Research (OAR) Public Data Repository (PDR) system software
11 stars 10 forks source link

Fixed dup page views #91

Closed chuanlin2018 closed 5 years ago

chuanlin2018 commented 5 years ago

whenever user visits PDR landing page or datacart page, GA generates two page views instead of one. This was because we always start datacart in the separated page which was considered a new page by the browser. So the page view was sent to GA server by both original script in index.html and the router event. Since PDR only has "landing", "about" and "datacart" pages and those are all "new page", no extra GA code is necessary in the router event.

So in this fix, I just simply remove the function in GA service. But I left the structure there because we need to track other events such as outbound click, download, etc.