You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/firebase/index.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,42 @@ If you use Segment's React Native source library, you must explicitly bundle the
114
114
115
115
<!-- LR Mar 2021: We didn't use the react-dest include here because Firebase needs the extra build.gradle step.-->
116
116
117
+
## Setting up Firebase with Analytics-Kotlin
118
+
If you're using the [Analytics-Kotlin library](/docs/connections/sources/catalog/libraries/mobile/kotlin-android), follow these steps to set up Firebase with Analytics-Kotlin:
119
+
1. In your top-level `build.gradle` file add these lines:
120
+
```kotlin
121
+
buildscript {
122
+
...
123
+
repositories {
124
+
google()
125
+
}
126
+
dependencies {
127
+
...
128
+
classpath 'com.google.gms:google-services:4.3.5'
129
+
}
130
+
}
131
+
```
132
+
2. In your app-module `build.gradle` file add these lines:
3. Copy the [FirebaseDestination.kt](https://github.com/segmentio/analytics-kotlin/blob/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins/FirebaseDestination.kt) file into your project's codebase.
146
+
4. Copy your `google-service.json` file to your app-module.
147
+
5. Go to your project's codebase and add these lines where you intialize the analytics client:
148
+
```kotlin
149
+
val Firebase = FirebaseDestination()
150
+
analytics.add(Firebase)
151
+
```
152
+
117
153
## Identify
118
154
119
155
When you call `identify` Segment will map to the corresponding Firebase Analytics calls:
0 commit comments