Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
f7988497
Commit
f7988497
authored
Aug 20, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing widget events
parent
18baf6c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
OneWeatherAnalytics/OneWeatherAnalytics/AnalyticsEvent.swift
+8
-0
OneWeatherCore/OneWeatherCore/Managers/WidgetManager.swift
+8
-0
No files found.
OneWeatherAnalytics/OneWeatherAnalytics/AnalyticsEvent.swift
View file @
f7988497
...
...
@@ -95,9 +95,13 @@ public enum AnalyticsEvent: String {
case
ANALYTICS_WIDGET_BOTTOM_SCROLLED
=
"WIDGET_PROMO_BOTTOM_SCROLLED"
case
ANALYTICS_WIDGET_PROMO_LEARN_CTA
=
"WIDGET_PROMO_LEARN_CTA"
case
ANALYTICS_WIDGET_LAUNCH_FROM
=
"LAUNCH_FROM_WIDGET"
///Widget actions
case
ANALYTICS_WIDGET_PLACED
=
"WIDGET_PLACED"
case
ANALYTICS_WIDGET_REMOVED
=
"WIDGET_REMOVED"
case
ANALYTICS_WIDGET_UPDATED
=
"WIDGET_UPDATED"
case
ANALYTICS_WIDGET_CARD_CLICK
=
"WIDGET_CARD_CLICK"
case
ANALYTICS_WIDGET_ADD_SUCCESSFUL
=
"WIDGET_ADD_SUCCESSFUL"
/// When widget is placed to the home screen
case
ANALYTICS_WIDGET_TEMP_SMALL_PLACE
=
"IOS_SMALL_WIDGET_PLACED"
...
...
@@ -112,6 +116,8 @@ public enum AnalyticsEvent: String {
case
ANALYTICS_WIDGET_PRECIP_REMOVE
=
"IOS_PRECIP_FORECAST_WIDGET_REMOVED"
case
ANALYTICS_WIDGET_WIND_REMOVE
=
"IOS_WIND_FORECAST_WIDGET_REMOVED"
case
ANALYTICS_WIDGET_RADAR_REMOVE
=
"IOS_RADAR_WIDGET_REMOVED"
///Shorts
case
ANALYTICS_SHORTS_SECTION_VIEW
=
"SHORTS_SECTION_VIEW"
case
ANALYTICS_SHORTS_CARD_VIEW
=
"SHORTS_CARD_VIEW"
case
ANALYTICS_SHORTS_CARD_CLICK
=
"SHORTS_CARD_CLICK"
...
...
@@ -121,6 +127,8 @@ public enum AnalyticsEvent: String {
case
ANALYTICS_SHORTS_LIKE_BUTTON_CLICK
=
"LIKE_BUTTON_CLICK"
case
ANALYTICS_SHORTS_EXIT_SHORTS_VIEW
=
"EXIT_SHORTS_VIEW"
case
ANALYTICS_SHORTS_NUDGE_VIEW
=
"NUDGE_VIEW"
///Onboarding
case
ANALYTICS_ONBOARDING_FORECAST_SEEN
=
"ONBOARDING_FORECAST_SEEN"
case
ANALYTICS_ONBOARDING_ALERT_SEEN
=
"ONBOARDING_ALERT_SEEN"
case
ANALYTICS_ONBOARDING_RADAR_SEEN
=
"ONBOARDING_RADAR_SEEN"
...
...
OneWeatherCore/OneWeatherCore/Managers/WidgetManager.swift
View file @
f7988497
...
...
@@ -127,6 +127,8 @@ public class WidgetManager {
}
let
name
=
WidgetOptions
.
name
(
for
:
option
)
AppAnalytics
.
shared
.
log
(
event
:
.
ANALYTICS_WIDGET_CARD_CLICK
)
AppAnalytics
.
shared
.
log
(
event
:
.
ANALYTICS_LAUNCH_FROM_WIDGET
)
AppAnalytics
.
shared
.
log
(
event
:
.
ANALYTICS_WIDGET_LAUNCH_FROM
,
params
:
[
.
ANALYTICS_KEY_WIDGET_NAME
:
name
])
}
...
...
@@ -170,6 +172,8 @@ public class WidgetManager {
widgetOptions
.
elements
()
.
enumerated
()
.
forEach
{
if
!
currentOptions
.
contains
(
$1
)
{
widgetOptions
.
remove
(
$1
)
//Analytic remove
addToAnalytics
(
option
:
$1
,
isPlaced
:
false
)
}
}
...
...
@@ -180,6 +184,10 @@ public class WidgetManager {
private
func
addToAnalytics
(
option
:
WidgetOptions
,
isPlaced
:
Bool
)
{
let
name
=
WidgetOptions
.
name
(
for
:
option
)
if
isPlaced
{
AppAnalytics
.
shared
.
log
(
event
:
.
ANALYTICS_WIDGET_ADD_SUCCESSFUL
)
}
AppAnalytics
.
shared
.
log
(
event
:
isPlaced
?
.
ANALYTICS_WIDGET_PLACED
:
.
ANALYTICS_WIDGET_REMOVED
,
params
:
[
.
ANALYTICS_KEY_WIDGET_NAME
:
name
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment