ngx-segment-analytics
ngx-segment-analytics copied to clipboard
Page is tracked twice when using Angular Universal
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
OS and Version?
Linux Ubuntu
Tools Version
Node: 8.15.1 npm 6.4.1
Targeted Angular version
7.2.8
Repro steps.
Load Angular app with Universal setup. You will see that first page track happens without 'Page Name' and then the second page load happens with the 'Page Name'.
ngOnInit() {
this.segment.page(`About`);
}
The log given by the failure.
Segment Debugger:
Desired functionality.
The page should be tracked only once and with 'Page Name' specified.
Mention any other details that might be useful.
This double event happens only on a first load of the application. Am I doing something wrong? I can't understand where this page event without the name is coming from.