Skip to content

Commit a9ef8a1

Browse files
committed
fix: set page event
1 parent a70516a commit a9ef8a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/shared/ui-global/analytics/src/lib/analytics.service.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,16 @@ export class AnalyticsService {
3333
}
3434

3535
#sendPage(url: string) {
36-
// Won't re-send if the url hasn't changed.
3736
if (url === this.previousUrl) {
3837
return;
3938
}
4039
this.previousUrl = url;
40+
41+
this.#gtag('event', 'page_view', {
42+
page_location: location.href,
43+
page_path: this.previousUrl,
44+
page_title: document.title,
45+
});
4146
}
4247

4348
#gtag(...args: unknown[]) {

0 commit comments

Comments
 (0)