Skip to content

Commit dcc8a9b

Browse files
authored
feat(landing): Update new feature pop ups to include google analytics. BM-1113 (#3363)
### Motivation We want to capture the event of pop screenshot in google analyst, also try to enable the 3d map pop up for 3 months and see how it goes. ### Modifications - Add gEvent for both open and close of 3d map pop up - Set the end date to 31th Jan 2025 ### Verification <!-- TODO: Say how you tested your changes. -->
1 parent e702c7e commit dcc8a9b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/landing/src/components/feature.updates.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { clsx } from 'clsx';
22
import { Component, ReactNode } from 'react';
33
import ReactModal from 'react-modal';
44

5-
import { Config } from '../config.js';
5+
import { Config, GaEvent, gaEvent } from '../config.js';
66

77
type FeatureUpdatesProps = {
88
header: string;
@@ -37,6 +37,7 @@ export class FeatureUpdates extends Component<FeatureUpdatesProps, FeatureUpdate
3737
handleClose = (): void => {
3838
this.setState({ showModal: false });
3939
window.localStorage.setItem(this.props.id, this.props.dismissedKey);
40+
gaEvent(GaEvent.Ui, `news:${this.props.id.toLowerCase()}:close`);
4041
};
4142

4243
override render(): ReactNode {
@@ -46,6 +47,7 @@ export class FeatureUpdates extends Component<FeatureUpdatesProps, FeatureUpdate
4647
if (!showModal) return null;
4748
if (Config.map.isDebug) return;
4849

50+
gaEvent(GaEvent.Ui, `news:${this.props.id.toLowerCase()}:open`);
4951
return (
5052
<ReactModal
5153
isOpen={showModal}

packages/landing/src/components/new-features/3d.map.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const baseUrl = WindowUrl.baseUrl();
1010
*/
1111
const bigImage = new URL('assets/Lg+3D+Maps+splash.gif', baseUrl).href; // Large gif file location
1212
const smallImage = new URL('assets/Sml+3D+map+splash.gif', baseUrl).href; // Small gif file location
13-
const closingDate = new Date('2024-10-30'); // End date for pop up screen
13+
const closingDate = new Date('2025-01-31'); // End date for pop up screen
1414
const id = `LINZ_Basemaps_3D_Map`; // Optional to set as Config.Version to disable Modal as default
1515
const dismissedKey = 'DISMISSED_MODALS_2024_10_3d_map'; // Feature released version can both been major version or minor version
1616
const recentUpdates = {

0 commit comments

Comments
 (0)