-
Notifications
You must be signed in to change notification settings - Fork 6
device wise metrics #683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
device wise metrics #683
Conversation
forms: device wise segregation in metrics
@@ -54,7 +55,13 @@ function aggregateFormVitalsByDevice(formVitalsCollection) { | |||
totals.formengagement = calculateSums(formengagement, totals.formengagement); | |||
totals.pageview = calculateSums(pageview, totals.pageview); | |||
totals.formsubmit = calculateSums(formsubmit, totals.formsubmit); | |||
|
|||
// Traffic Acquisition is not aggregated by device type | |||
totals.trafficacquisition = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totals.trafficacquisition = { ...trafficacquisition }
formEngagement, | ||
formSubmit, | ||
pageViews: { | ||
total: pageViews, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to simplify it to:
urls.push({
url,
...metrics
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can cleanup all the existing code then
let formViews = metrics.formview.total; | ||
let mobileFormViews = metrics.formview.mobile; | ||
let desktopFormViews = metrics.formview.desktop; | ||
if (!formViews) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets skip the fallback now as we have improved RUM to capture formviews.
pageViews: deviceData.pageview.total, | ||
formViews: deviceData.formview.total, | ||
formEngagement: deviceData.formengagement.total, | ||
pageViews: deviceData.pageview, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here too:
urls.push({
url,
...metrics
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline comments.
// Default to pageViews if formViews are not available | ||
const formViews = metrics.formview.total || pageViews; | ||
let formViews = metrics.formview.total; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check if formViews = 0
hasLowerConversionRate this will do division by 0
forms: device wise segregation in metrics
Please ensure your pull request adheres to the following guidelines:
Related Issues
Thanks for contributing!