You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
Currently the stopTrackPage method does not support the overriding of the refUri property like the regular trackPageView does.
The stopTrackPage method takes a name, url, customProperties and measurements arguments. But even if you include a refUri value in the customProperties, another refUri property is automatically set (not on the custom properties, rather on the pageView object itself) in sendPageViewInternal and it seems that the latter takes precedence, since that is the only value I can see in my Azure portal.
this._pageTracking.action=(name,url,refUri,duration,properties,measurements)=>{// duration must be a custom property in order for the collector to extract itif(CoreUtils.isNullOrUndefined(properties)){properties={};}properties[durationProperty]=duration.toString();constpageViewItem: IPageViewTelemetry={
name,uri: url,
refUri,
properties,
measurements
};this.sendPageViewInternal(pageViewItem);}
Alternatives
Another solution could be that the custom properties are also checked for the presence of a refUri property in sendPageViewInternal and the browser fallback is only used if refUri is set on neither the page view object itself or the custom proprties.
Additional context
We have an SPA, so the referrer value is only valid on the first page load.
The browser refUri fallback is also a full url that includes the domain name, but in our SPA the domain part is irrelevant since the same application runs on many different domains.
The text was updated successfully, but these errors were encountered:
Problem
Currently the stopTrackPage method does not support the overriding of the refUri property like the regular trackPageView does.
The stopTrackPage method takes a name, url, customProperties and measurements arguments. But even if you include a refUri value in the customProperties, another refUri property is automatically set (not on the custom properties, rather on the pageView object itself) in sendPageViewInternal and it seems that the latter takes precedence, since that is the only value I can see in my Azure portal.
Solution
Provide an optional refUri parameter on stopTrackPage and set this property in the page tracking callback. It's interface already has refUri anyway.
Alternatives
Another solution could be that the custom properties are also checked for the presence of a refUri property in sendPageViewInternal and the browser fallback is only used if refUri is set on neither the page view object itself or the custom proprties.
Additional context
We have an SPA, so the referrer value is only valid on the first page load.
The browser refUri fallback is also a full url that includes the domain name, but in our SPA the domain part is irrelevant since the same application runs on many different domains.
The text was updated successfully, but these errors were encountered: