Skip to content
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

Add mobile screen engagement calculation using the screen summary context (close #16) #17

Merged

Conversation

matus-tomlein
Copy link
Contributor

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: snowplow/iglu-central#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?

  • 🍕 Feature

Checklist

  • 🎉 I have verified that these changes work locally
  • 💣 Is your change a breaking change?

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📓 internal package docs (ymls, macros, readme, if applicable)
  • 📕 I have raised a Snowplow documentation PR if applicable (Link here if required)
  • 🙅 no documentation needed

@matus-tomlein matus-tomlein requested a review from rlh1994 January 3, 2024 14:16
@rlh1994 rlh1994 changed the base branch from main to release/snowplow-unified/0.1.3 January 3, 2024 14:23
@rlh1994 rlh1994 requested a review from a team as a code owner January 3, 2024 14:23
@matus-tomlein matus-tomlein force-pushed the issue/mobile_screen_engagement branch from 9d7f97e to 7a812e4 Compare January 3, 2024 15:40
Copy link
Contributor

@rlh1994 rlh1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things to change if we can. Also you'll need to add the same logic (have fun :D) to the sessions table

@rlh1994
Copy link
Contributor

rlh1994 commented Jan 3, 2024

Also can you add a changelog entry, and we'll need to update the docs to reflect this but that's not required to merge this PR.

@matus-tomlein matus-tomlein force-pushed the issue/mobile_screen_engagement branch from 4f7fc00 to 3b11265 Compare January 4, 2024 11:25
Copy link
Contributor

@rlh1994 rlh1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few questions really, otherwise I think it looks good (assuming you tested on redshift)!

Base automatically changed from release/snowplow-unified/0.1.3 to release/snowplow-unified/0.2.0 January 8, 2024 12:28
@matus-tomlein matus-tomlein force-pushed the issue/mobile_screen_engagement branch from cd06569 to eeeba0c Compare January 10, 2024 09:17
@matus-tomlein matus-tomlein force-pushed the issue/mobile_screen_engagement branch from 26309ac to 60112c4 Compare January 19, 2024 15:12
@matus-tomlein matus-tomlein force-pushed the issue/mobile_screen_engagement branch from 60112c4 to 0928227 Compare January 22, 2024 13:01
@matus-tomlein matus-tomlein merged commit 7c817a4 into release/snowplow-unified/0.2.0 Jan 22, 2024
4 checks passed
@matus-tomlein matus-tomlein deleted the issue/mobile_screen_engagement branch January 22, 2024 15:09
agnessnowplow pushed a commit that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants