forked from openedx/openedx-app-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fullstory Analytics SDK Implementation (openedx#347)
* feat: Fullstory Analytics SDK Implementation We have introduced the Fullstory Analytics Provider, which includes three main methods: Identify: This method identifies the user by passing a userID (uid). Additionally, it includes a displayName for use on the Fullstory dashboard. Event: This method records custom app events. Page: This method functions similarly to a screen event, tracking page views. Fixes: LEARNER-10041 * feat: Add screen event method to the Analytics Manager Fixes: LEARNER-10041 * fix: Course Home Tabs Events Fixes: LEARNER-10041 * chore: Discovery Screen Events Fixes: LEARNER-10041 * chore: Main Dashboard Screen Events Fixes: LEARNER-10041 * chore: Auth Screen Events Fixes: LEARNER-10041 * chore: Profile Screen Events Fixes: LEARNER-10041 * chore: Course Screen Events Fixes: LEARNER-10041 * fix: PLS Banner Multiple Events Fixes: LEARNER-10041 * chore: Logistration Screen Event Fixes: LEARNER-10041 * refactor: Optimize code Fixes: LEARNER-10041
- Loading branch information
1 parent
9f0740f
commit 6efdd76
Showing
36 changed files
with
297 additions
and
46 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
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
41 changes: 41 additions & 0 deletions
41
app/src/main/java/org/openedx/app/analytics/FullstoryAnalytics.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,41 @@ | ||
package org.openedx.app.analytics | ||
|
||
import com.fullstory.FS | ||
import com.fullstory.FSSessionData | ||
import org.openedx.core.utils.Logger | ||
|
||
class FullstoryAnalytics : Analytics { | ||
|
||
private val logger = Logger(TAG) | ||
|
||
init { | ||
FS.setReadyListener { sessionData: FSSessionData -> | ||
val sessionUrl = sessionData.currentSessionURL | ||
logger.d { "FullStory Session URL is: $sessionUrl" } | ||
} | ||
} | ||
|
||
override fun logScreenEvent(screenName: String, params: Map<String, Any?>) { | ||
logger.d { "Page : $screenName $params" } | ||
FS.page(screenName, params).start() | ||
} | ||
|
||
override fun logEvent(eventName: String, params: Map<String, Any?>) { | ||
logger.d { "Event: $eventName $params" } | ||
FS.page(eventName, params).start() | ||
} | ||
|
||
override fun logUserId(userId: Long) { | ||
logger.d { "Identify: $userId" } | ||
FS.identify( | ||
userId.toString(), mapOf( | ||
DISPLAY_NAME to userId | ||
) | ||
) | ||
} | ||
|
||
private companion object { | ||
const val TAG = "FullstoryAnalytics" | ||
private const val DISPLAY_NAME = "displayName" | ||
} | ||
} |
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
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
Oops, something went wrong.