-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Analytics to Flank Wrapper (#2085)
Fixes #2068 ## Test Plan > How do we know the code works? Flank wrapper analytics are visible in mix panel. New module for analytics is created ## Checklist - [x] Documented - [x] Unit tested
- Loading branch information
1 parent
ace7b16
commit 4d1583b
Showing
14 changed files
with
46 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
object Modules { | ||
const val COMMON = ":common" | ||
const val ANALYTICS = ":tool:analytics" | ||
const val MIXPANEL_ANALYTICS = ":tool:analytics:mixpanel" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
flank_wrapper/src/main/kotlin/com/github/flank/wrapper/internal/FlankWrapperAnalytics.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.github.flank.wrapper.internal | ||
|
||
import flank.tool.analytics.mixpanel.send | ||
import flank.tool.analytics.mixpanel.toEvent | ||
|
||
private const val FLANK_WRAPPER = "flank_wrapper" | ||
private const val EVENT_RUN = "flank run" | ||
private const val EVENT_NEW_FLANK_VERSION_DOWNLOADED = "new_version_downloaded" | ||
|
||
internal fun sendAnalyticsNewFlankVersionDownloaded() { | ||
eventWithoutProperties(EVENT_NEW_FLANK_VERSION_DOWNLOADED).send() | ||
} | ||
|
||
internal fun sendAnalyticsFlankRun() { | ||
eventWithoutProperties(EVENT_RUN).send() | ||
} | ||
|
||
private fun eventWithoutProperties( | ||
eventName: String | ||
) = emptyMap<String, Any>().toEvent(FLANK_WRAPPER, eventName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.1.0 | ||
1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters