A fully incremental model, that transforms raw web & mobile event data generated by the Snowplow JavaScript & mobile trackers into a series of derived tables of varying levels of aggregation.
Other
13
stars
6
forks
source link
Add mobile screen engagement calculation using the screen summary context (close #16) #17
This makes use of the information in the screen_summary context entity to calculate mobile app engagement. The new schemas that this builds on are in review: https://github.com/snowplow/iglu-central/pull/1358
The following columns in the views table were updated/added:
engaged_time_in_s
Calculated as the maximum foreground_sec.
absolute_time_in_s
Calculated as the maximum foreground_sec + background_sec.
horizontal_pixels_scrolled
Calculated as the maximum max_x_offset.
vertical_pixels_scrolled
Calculated as the maximum max_y_offset.
horizontal_percentage_scrolled
Calculated as the maximum max_x_offset / content_width * 100.
vertical_percentage_scrolled
Calculated as the maximum max_y_offset / content_width * 100.
last_list_item_index
New metric, not calculated on Web.
Calculated as the maximum last_item_index.
list_items_count
New metric, not calculated on Web.
Calculated as the maximum items_count.
list_items_percentage_scrolled
New metric, not calculated on Web.
Calculated as the (maximum last_item_index + 1) / items_count * 100.
New configurations:
snowplow__enable_screen_summary_context
snowplow__screen_summary_context
What type of PR is this?
[x] 🍕 Feature
Checklist
[x] 🎉 I have verified that these changes work locally
[ ] 💣 Is your change a breaking change?
Added tests?
[x] 👍 yes
[ ] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help
Added to documentation?
[x] 📓 internal package docs (ymls, macros, readme, if applicable)
Description
Issue #16
This makes use of the information in the
screen_summary
context entity to calculate mobile app engagement. The new schemas that this builds on are in review: https://github.com/snowplow/iglu-central/pull/1358The following columns in the
views
table were updated/added:engaged_time_in_s
foreground_sec
.absolute_time_in_s
foreground_sec
+background_sec
.horizontal_pixels_scrolled
max_x_offset
.vertical_pixels_scrolled
max_y_offset
.horizontal_percentage_scrolled
max_x_offset
/content_width
* 100.vertical_percentage_scrolled
max_y_offset
/content_width
* 100.last_list_item_index
last_item_index
.list_items_count
items_count
.list_items_percentage_scrolled
last_item_index
+ 1) /items_count
* 100.New configurations:
snowplow__enable_screen_summary_context
snowplow__screen_summary_context
What type of PR is this?
Checklist
Added tests?
Added to documentation?