From 25f9b88515edd4a54f18c00e82498aeb63136d46 Mon Sep 17 00:00:00 2001 From: Lucas Li <35748253+yzlucas@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:09:38 -0800 Subject: [PATCH 1/2] snowplow track on Share button from detail page and Highlight cards (#2147) * snowplow track on Share button from detail page and Highlight cards * typo change. Add snowplow to desktop share --- .../highlights-card.component.ts | 20 ++++++++++++++++++- .../app/services/common-utility.service.ts | 16 ++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/cards/highlights-card/highlights-card.component.ts b/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/cards/highlights-card/highlights-card.component.ts index 930e9b096..204590b23 100644 --- a/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/cards/highlights-card/highlights-card.component.ts +++ b/client/wfnews-war/src/main/angular/src/app/components/dashboard-component/widgets/cards/highlights-card/highlights-card.component.ts @@ -1,5 +1,8 @@ import { Component, Input } from '@angular/core'; import { ProcessedPost } from '../../highlights-widget/highlights-widget.component'; +import { snowPlowHelper } from '@app/utils'; +import { Router } from '@angular/router'; +import { AppConfigService } from '@wf1/core-ui'; @Component({ selector: 'highlights-card', @@ -7,9 +10,24 @@ import { ProcessedPost } from '../../highlights-widget/highlights-widget.compone styleUrls: ['./highlights-card.component.scss'] }) export class HighlightsCardComponent { - @Input() post: ProcessedPost + @Input() post: ProcessedPost; + public snowPlowHelper = snowPlowHelper; + + constructor( + private appConfigService: AppConfigService, + private currentRouter: Router + ){ + + } openLink(link: string){ + const url = this.appConfigService.getConfig().application.baseUrl.toString() + this.currentRouter.url.slice(1); + + this.snowPlowHelper(url, { + action: 'highlights_card_click', + text: 'Navigate to Highlight Link' + }); + if (link) { window.open(link, '_blank'); } diff --git a/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts b/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts index 7ce6d90d6..ca3c0cb34 100644 --- a/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts +++ b/client/wfnews-war/src/main/angular/src/app/services/common-utility.service.ts @@ -15,9 +15,9 @@ import { MatDialog } from '@angular/material/dialog'; import { Capacitor, CapacitorHttp } from '@capacitor/core'; import { map } from 'rxjs/operators'; import { Meta, Title } from '@angular/platform-browser'; +import { snowPlowHelper } from '@app/utils'; const MAX_CACHE_AGE = 30 * 1000; - export interface Coordinates { readonly accuracy: number; readonly altitude: number | null; @@ -37,6 +37,7 @@ export interface Position { providedIn: 'root', }) export class CommonUtilityService { + snowPlowHelper = snowPlowHelper; private myLocation; private locationTime; private location; @@ -53,6 +54,7 @@ export class CommonUtilityService { private dialog: MatDialog, private titleService: Title, private metaService: Meta, + private currentRouter: Router, ) { setTimeout(() => (this.rofService = injector.get(ReportOfFireService))); @@ -363,6 +365,13 @@ export class CommonUtilityService { } shareMobile(shareTitle: string) { + const url = this.appConfigService.getConfig().application.baseUrl.toString() + this.currentRouter.url.slice(1); + + this.snowPlowHelper(url, { + action: 'share_from_mobile_device', + text: shareTitle + }); + const currentUrl = this.appConfigService.getConfig().application.baseUrl.toString() + this.router.url.slice(1); // contents of the share is out of scope for wfnews-2403. Enhancment should be available in wfnews-2422 const imageUrl = this.appConfigService.getConfig().application.baseUrl.toString() + '/assets/images/share-wildfire.png'; @@ -381,6 +390,11 @@ export class CommonUtilityService { openShareWindow(type: string, incidentName: string) { const url = this.appConfigService.getConfig().application.baseUrl.toString() + this.router.url.slice(1); + + this.snowPlowHelper(url, { + action: 'share_from_desktop', + text: `${type}, ${incidentName}` + }); this.dialog.open(ShareDialogComponent, { panelClass: 'contact-us-dialog', width: '500px', From 9b6e31eade4cde17a08cce21321f0cb2a7767c47 Mon Sep 17 00:00:00 2001 From: ssylver93 <107515688+ssylver93@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:52:54 -0800 Subject: [PATCH 2/2] Update iOS marketing version (#2149) --- .../src/main/angular/ios/App/App.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/wfnews-war/src/main/angular/ios/App/App.xcodeproj/project.pbxproj b/client/wfnews-war/src/main/angular/ios/App/App.xcodeproj/project.pbxproj index 4dde4692b..7502446cf 100644 --- a/client/wfnews-war/src/main/angular/ios/App/App.xcodeproj/project.pbxproj +++ b/client/wfnews-war/src/main/angular/ios/App/App.xcodeproj/project.pbxproj @@ -363,7 +363,7 @@ INFOPLIST_KEY_CFBundleDisplayName = "BC Wildfire"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 2.4.0; + MARKETING_VERSION = 3.1.8; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = ca.bc.gov.WildfireInformation; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -391,7 +391,7 @@ INFOPLIST_KEY_CFBundleDisplayName = "BC Wildfire"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 2.4.0; + MARKETING_VERSION = 3.1.8; PRODUCT_BUNDLE_IDENTIFIER = ca.bc.gov.WildfireInformation; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "";