File tree Expand file tree Collapse file tree 3 files changed +345
-705
lines changed
Expand file tree Collapse file tree 3 files changed +345
-705
lines changed Original file line number Diff line number Diff line change 3838 "@guardian/eslint-config-typescript" : " 9.0.1" ,
3939 "@guardian/identity-auth" : " 6.0.1" ,
4040 "@guardian/identity-auth-frontend" : " 8.1.0" ,
41+ "@guardian/ophan-tracker-js" : " 2.6.1" ,
4142 "@guardian/libs" : " 26.0.0" ,
42- "@guardian/ophan-tracker-js" : " 2.3.2" ,
4343 "@guardian/react-crossword" : " 6.3.0" ,
4444 "@guardian/shimport" : " 1.0.2" ,
4545 "@guardian/source" : " 11.3.0" ,
4646 "@guardian/source-development-kitchen" : " 18.1.1" ,
47- "@guardian/support-dotcom-components" : " 7.7.0 " ,
47+ "@guardian/support-dotcom-components" : " 7.8.1 " ,
4848 "@guardian/tsconfig" : " 0.2.0" ,
4949 "@playwright/test" : " 1.52.0" ,
5050 "@sentry/browser" : " 10.10.0" ,
Original file line number Diff line number Diff line change 11import { type EditionId } from '../../lib/edition' ;
22import type { RenderingTarget } from '../../types/renderingTarget' ;
3- import { getOphan , recordExperiences , recordPerformance } from './ophan' ;
3+ import {
4+ getOphan ,
5+ recordExperiences ,
6+ recordPerformance ,
7+ submitComponentEvent ,
8+ } from './ophan' ;
49
510const getEditionForOphan = ( editionId : EditionId ) => {
611 switch ( editionId ) {
@@ -29,4 +34,20 @@ export const recordInitialPageEvents = async (
2934 void recordPerformance ( renderingTarget ) ;
3035 window . removeEventListener ( 'load' , load , false ) ;
3136 } ) ;
37+
38+ window . addEventListener ( 'pageshow' , ( event : PageTransitionEvent ) => {
39+ if ( ! event . persisted ) {
40+ return ;
41+ }
42+
43+ void submitComponentEvent (
44+ {
45+ action : 'VIEW' ,
46+ component : {
47+ componentType : 'BF_CACHE' ,
48+ } ,
49+ } ,
50+ renderingTarget ,
51+ ) ;
52+ } ) ;
3253} ;
You can’t perform that action at this time.
0 commit comments