Skip to content

Commit

Permalink
Implement screen engagement tracking on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Jan 2, 2024
1 parent 0fae287 commit c7310ae
Show file tree
Hide file tree
Showing 20 changed files with 848 additions and 24 deletions.
2 changes: 2 additions & 0 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ vars:
snowplow__enable_application_context: false
snowplow__enable_screen_context: false
snowplow__enable_deep_link_context: false
snowplow__enable_screen_summary_context: false
# add extra custom fields:
snowplow__page_view_passthroughs: []
snowplow__session_passthroughs: []
Expand Down Expand Up @@ -125,6 +126,7 @@ vars:
snowplow__application_error_events: com_snowplowanalytics_snowplow_application_error_1
snowplow__screen_view_events: com_snowplowanalytics_mobile_screen_view_1
snowplow__deep_link_context: com_snowplowanalytics_mobile_deep_link_1
snowplow__screen_summary_context: com_snowplowanalytics_mobile_screen_summary_1

# Completely or partially remove models from the manifest during run start.
on-run-start:
Expand Down
10 changes: 9 additions & 1 deletion integration_tests/.scripts/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ for db in ${DATABASES[@]}; do

echo "Snowplow unified integration tests: Test models"

eval "dbt test --exclude snowplow_unified_web_vital_measurements snowplow_unified_web_vital_measurements_actual snowplow_unified_web_vital_events_this_run test_name:not_null --store-failures --target $db" || exit 1;
eval "dbt test --exclude snowplow_unified_web_vital_measurements snowplow_unified_web_vital_measurements_actual snowplow_unified_web_vital_events_this_run snowplow_unified_views_mobile_screen_engagement_actual test_name:not_null --store-failures --target $db" || exit 1;

echo "Snowplow unified integration tests: All non-CWV tests passed"

Expand All @@ -72,4 +72,12 @@ for db in ${DATABASES[@]}; do

echo "Snowplow unified integration tests: All CWV tests passed"

echo "Snowplow unified integration tests: Test mobile screen engagement"

eval "dbt run --select +snowplow_unified_views_mobile_screen_engagement_actual snowplow_unified_views_mobile_screen_engagement_expected_stg source --full-refresh --vars '{snowplow__allow_refresh: true, snowplow__start_date: '2023-12-19', snowplow__backfill_limit_days: 50, snowplow__enable_cwv: false, snowplow__enable_screen_summary_context: true, snowplow__enable_ua: false, snowplow__enable_iab: false, snowplow__enable_web: false, snowplow__enable_browser_context: false, snowplow__enable_consent: false, snowplow__enable_yauaa: false, snowplow__enable_geolocation_context: false, snowplow__enable_deep_link_context: false, snowplow__enable_app_errors: false}' --target $db" || exit 1;

eval "dbt test --select snowplow_unified_views_mobile_screen_engagement_actual --vars '{snowplow__enable_screen_summary_context: true, snowplow__enable_web: false, snowplow__enable_cwv: false, snowplow__enable_ua: false, snowplow__enable_iab: false, snowplow__enable_web: false, snowplow__enable_browser_context: false, snowplow__enable_consent: false, snowplow__enable_yauaa: false, snowplow__enable_geolocation_context: false, snowplow__enable_deep_link_context: false, snowplow__enable_app_errors: false}' --store-failures --target $db" || exit 1;

echo "Snowplow unified integration tests: Mobile screen engagement tests passed"

done
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"view_id","engaged_time_in_s","absolute_time_in_s","horizontal_pixels_scrolled","vertical_pixels_scrolled","horizontal_percentage_scrolled","vertical_percentage_scrolled","last_list_item_index","list_items_count","list_items_percentage_scrolled"
"FFA557C6-A1A4-41BB-ADD1-C3E22238CA8C",3.71,3.71,,,,,13,514,3
"0583165C-D5FF-4AAA-8D53-DFBBCC60EB05",9.1,9.1,,,,,,,
"0E5C88B5-6A99-430B-A7AE-B6E78AE558DB",1.67,1.67,,,,,8,514,2
"ADCA3560-226C-44C0-9B92-CAA4A5145F22",3.89,3.89,,,,,,,
"B59FBDC2-9231-45CF-81AE-F05DDBA48187",23.6,23.6,,,,,513,514,100
"52832BA1-7BFF-4BA8-809F-2CEFBDE753D4",7.33,7.33,,,,,,,
"BA055DC6-8B6D-4EF8-AC59-3B12A70BF12E",11.93,11.93,,,,,16,514,3
"DFEAC2C7-D7F7-4CF4-BB48-11D2041F5B9A",4.75,4.75,,,,,3,514,1
"827628B2-2A5D-4C9A-8485-5F03C99E2AD0",3.19,3.19,,,,,3,514,1
"79B23FE9-A39E-4B38-B5DD-550F472654D5",9.99,9.99,,,,,,,
"084241FC-AC55-4A50-A9C6-C79DC5776A58",1.49,1.49,,,,,,,
"84B44128-3A54-4B03-91BC-18D13BAEAFFA",1.44,1.44,,,,,,,
"8690C642-11C5-4CD1-98F8-B0AAB7610C2F",5.51,5.51,,885,,43,,,
"480695F3-C2FB-445C-8CBD-175335EEE07E",5.37,5.37,,,,,,,
"ABA46DD0-449B-4CFD-A769-1A157F2B84C4",15.88,21.630000000000003,,1214,,59,,,
"29A00595-F349-4485-A8F2-43A35613CD3A",3.29,3.29,,,,,,,
"A7D446AF-CF3C-476F-B8D1-5DBC85305F03",11.76,15.92,,2052,,100,,,
"764C3FD2-0053-4B19-8A88-B8539EE03B78",0,0,,,,,,,
"0145CFA7-EB42-4DCE-9BAB-E6101521A62C",5.88,5.88,,,,,30,514,6
"AC0FF896-E724-480B-B0F9-138CB3957DB5",2.99,2.99,,,,,,,
"A74262C0-BE5F-4558-B505-59B6EF50E749",8.61,8.61,,,,,89,514,18
"5E2CCA4B-440F-4F6B-AEB9-8A0C572FC877",8.32,8.32,,,,,,,
"099065CB-C323-4D93-B648-79109010291A",15.68,15.68,,,,,12,514,3
"97D5CEE2-6606-4ACE-B2A9-05CFBE0D1D67",7.93,7.93,,,,,,,
"A8855D04-5537-4D1C-8672-8F24C9476965",6.45,6.45,,,,,7,514,2
"608BC6BA-3246-4B7A-8EF4-B7C7C990E5BF",2.93,2.93,,,,,,,
"1AF39382-2FAC-44E9-BE27-84820E98E3FA",4.75,9.96,,,,,9,514,2
"1DB7FF00-E6D2-43DB-B1FC-4D5B1EC8A518",19.08,19.08,,,,,,,
"48CEF47E-9BB0-48A8-A52E-24A525AA80C7",0,0,,,,,,,
Loading

0 comments on commit c7310ae

Please sign in to comment.