mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-04-04 11:28:30 +08:00
[portal][fix] fix incorrect page_view events
This commit is contained in:
@@ -17,13 +17,11 @@ function pageview(measurementID: string, url: string) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.gtag('config', measurementID, {
|
||||
window.gtag('event', 'page_view', {
|
||||
page_location: window.location.href,
|
||||
page_path: url,
|
||||
});
|
||||
|
||||
window.gtag('event', url, {
|
||||
event_category: 'pageview',
|
||||
event_label: document.title,
|
||||
page_title: document.title,
|
||||
send_to: measurementID,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user