For support questions, please consider using Gitter - Chat
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Summary
When any non-default pageTracking is configured for Angulartics2 page views, the corresponding clearUrl page handling is not applied when processing eventTrack triggers. As a result, GA events report the simple hash substring URL if an explicit page property has not been set on the event binding, which overrides the originally configured page view report in Google Analytics Content dashboard. This results in cleared IDs and QueryParams still appearing in GA whenever events are fired.
What is the expected behavior?
GA events page information (dp param) should be reported in the same fashion as the pageview page information, otherwise default format page views are erroneously reported in GA.
What is the motivation / use case for changing the behavior?
Proper GA content (page) view reporting, so that stripped ID and customized URLs are not reported when firing page events.
For support questions, please consider using Gitter - Chat
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Summary When any non-default
pageTracking
is configured for Angulartics2 page views, the correspondingclearUrl
page handling is not applied when processingeventTrack
triggers. As a result, GA events report the simple hash substring URL if an explicit page property has not been set on the event binding, which overrides the originally configured page view report in Google Analytics Content dashboard. This results in cleared IDs and QueryParams still appearing in GA whenever events are fired.Reproduction info and code points
App module provider config:
Configure an
angulartics2On="click"
button in the appObserve the GA PageView request args
Observe the GA Event request args
Related code points:
GA page metadata fallbacks - page metadata config with browser hash fallback when not explicitly set (default pageview behavior when not customized)
angulartics2-core trackUrlChanges - URL clearing logic executed for page view requests
angulartics2On eventTrack
What is the expected behavior? GA events page information (
dp
param) should be reported in the same fashion as the pageview page information, otherwise default format page views are erroneously reported in GA.What is the motivation / use case for changing the behavior? Proper GA content (page) view reporting, so that stripped ID and customized URLs are not reported when firing page events.
Environment:
Package Version
@angular-devkit/architect 0.801.3 @angular-devkit/build-angular 0.801.3 @angular-devkit/build-optimizer 0.801.3 @angular-devkit/build-webpack 0.801.3 @angular-devkit/core 8.1.3 @angular-devkit/schematics 8.3.5 @angular/cdk 8.2.0 @angular/cli 8.3.5 @angular/common 8.1.3 @angular/http 7.2.15 @angular/material 8.2.0 @ngtools/webpack 8.1.3 @schematics/angular 8.3.5 @schematics/update 0.803.5 rxjs 6.4.0 typescript 3.4.5 webpack 4.35.2