Skip to content

Commit 0019593

Browse files
authored
Pixels around sync promotion (#4921)
Task/Issue URL: https://app.asana.com/0/72649045549333/1207997744789996/f ### Description Pixels around promoting sync feature. ### Steps to test this PR Logcat filter: `message~:"Pixel sent: m_sync_signup_direct" | message~:"Pixel sent: m_sync_signup_connect" | message~:"Pixel sent: sync_promotion_" | message~:"Pixel sent: sync_get_other_devices"` - [x] Fresh install ## Sync promo banners ### Bookmarks - [x] visit Bookmarks screen; verify no pixels in logs about promo. - [x] Add >= 1 bookmark. then visit Bookmarks - [x] Verify `sync_promotion_displayed` in logs - [x] Choose **Set Up Sync**; verify `sync_promotion_confirmed` in logs, with `source=bookmarks` - [x] Go back and dismiss the promo; verify `sync_promotion_dismissed` in logs, with `source=bookmarks` ### Passwords This is a copy of the last tests, but with passwords instead of bookmarks. - [x] Repeat tests above, making sure the same pixels are in the logs but with `source=passwords` for each of them ## Get DuckDuckGo on Other Devices There are 3 ways to get to this screen from the sync flow: - not signed into sync - just finishing signing into sync - already signed into sync The same pixels apply for each, but will have a different `source` parameter in each scenario. ### Not signed into sync - [x] Open **Sync & Backup**, tap on **Get DuckDuckGo on Other Devices** - [x] Verify `sync_get_other_devices` is in logs, with `source=not_activated` - [x] Tap on the **Share Download Link** button; verify `sync_get_other_devices_share` in logs, with `source=not_activated` - [x] Cancel share sheet, and tap on blue link. Verify `sync_get_other_devices_copy` in logs, with `source=not_activated` ### Signing into sync - [x] When not signed in, go through the process of signing in until you see the **Your data is synced!** screen - [x] Tap on **Get DuckDuckGo on Other Devices**; verify `sync_get_other_devices` in logs, with `source=activating` - [x] Repeat the share button and copy link steps above, verifying that `source=activating` ### When already signed in - [x] Open **Sync & Backup**, tap on **Get DuckDuckGo on Other Devices** - [x] Verify `sync_get_other_devices` with `source=activated` - [x] Repeat the share button and copy link steps above, verifying that `source= activated ` ## Sync set up pixels ### Signing into sync "directly" - [x] Sign out of sync - [x] Use the **bookmarks** sync promo to get to sync settings - [x] Choose **Sync and Backup This Device** and complete sync flow. - [x] Verify `m_sync_signup_direct` in logs, with `source=promotion_bookmarks` - [x] Repeat the above steps using the **passwords** promo, ensuring that `source=promotion_passwords` - [x] Repeat the above steps but this time do not use a promo; open Sync settings directly. Verify `m_sync_signup_direct` in logs, with no source param ### Syncing with another device - [x] Sign out of sync - [x] Use the **bookmarks** sync promo to get to sync settings - [x] Choose **Sync With Another Device** and complete sync - [x] Verify `m_sync_signup_connect` in logs, with `source=promotion_bookmarks` - [x] Repeat the steps from **passwords** promo, ensuring `source=promotion_passwords - [x] Repeat the steps again by not using a promo, visiting Sync settings directly. Ensure `m_sync_signup_connect` in logs but with no source param
1 parent 1e0a1b2 commit 0019593

23 files changed

+297
-76
lines changed

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/pixels/SyncPixelParamRemovalPlugin.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ import javax.inject.Inject
2525
@ContributesMultibinding(AppScope::class)
2626
class SyncPixelParamRemovalPlugin @Inject constructor() : PixelParamRemovalPlugin {
2727
override fun names(): List<Pair<String, Set<PixelParameter>>> {
28-
return listOf(SyncPixelName.SYNC_PATCH_COMPRESS_FAILED.pixelName to PixelParameter.removeAtb())
28+
return listOf(
29+
SyncPixelName.SYNC_PATCH_COMPRESS_FAILED.pixelName to PixelParameter.removeAtb(),
30+
31+
SyncPixelName.SYNC_FEATURE_PROMOTION_DISPLAYED.pixelName to PixelParameter.removeAtb(),
32+
SyncPixelName.SYNC_FEATURE_PROMOTION_CONFIRMED.pixelName to PixelParameter.removeAtb(),
33+
SyncPixelName.SYNC_FEATURE_PROMOTION_DISMISSED.pixelName to PixelParameter.removeAtb(),
34+
35+
SyncPixelName.SYNC_GET_OTHER_DEVICES_SCREEN_SHOWN.pixelName to PixelParameter.removeAtb(),
36+
SyncPixelName.SYNC_GET_OTHER_DEVICES_LINK_COPIED.pixelName to PixelParameter.removeAtb(),
37+
SyncPixelName.SYNC_GET_OTHER_DEVICES_LINK_SHARED.pixelName to PixelParameter.removeAtb(),
38+
)
2939
}
3040
}

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/pixels/SyncPixels.kt

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import com.duckduckgo.sync.impl.Result.Error
2626
import com.duckduckgo.sync.impl.pixels.SyncPixelName.SYNC_DAILY
2727
import com.duckduckgo.sync.impl.pixels.SyncPixelName.SYNC_DAILY_SUCCESS_RATE_PIXEL
2828
import com.duckduckgo.sync.impl.pixels.SyncPixelName.SYNC_OBJECT_LIMIT_EXCEEDED_DAILY
29+
import com.duckduckgo.sync.impl.pixels.SyncPixelParameters.SYNC_FEATURE_PROMOTION_SOURCE
2930
import com.duckduckgo.sync.impl.stats.SyncStatsRepository
3031
import com.duckduckgo.sync.store.SharedPrefsProvider
3132
import com.squareup.anvil.annotations.ContributesBinding
@@ -61,13 +62,15 @@ interface SyncPixels {
6162

6263
/**
6364
* Fired when user sets up a sync account from connect flow
65+
* @param source: the source of the signup, e.g. "promotion_bookmarks", "promotion_passwords" etc.... Can be null if not applicable.
6466
*/
65-
fun fireSignupConnectPixel()
67+
fun fireSignupConnectPixel(source: String?)
6668

6769
/**
6870
* Fired when user sets up a sync account directly.
71+
* @param source: the source of the signup, e.g. "promotion_bookmarks", "promotion_passwords" etc.... Can be null if not applicable.
6972
*/
70-
fun fireSignupDirectPixel()
73+
fun fireSignupDirectPixel(source: String?)
7174

7275
fun fireSyncAccountErrorPixel(
7376
result: Error,
@@ -115,12 +118,12 @@ class RealSyncPixels @Inject constructor(
115118
pixel.fire(SyncPixelName.SYNC_LOGIN)
116119
}
117120

118-
override fun fireSignupConnectPixel() {
119-
pixel.fire(SyncPixelName.SYNC_SIGNUP_CONNECT)
121+
override fun fireSignupConnectPixel(source: String?) {
122+
pixel.fire(SyncPixelName.SYNC_SIGNUP_CONNECT, buildSourceMap(source))
120123
}
121124

122-
override fun fireSignupDirectPixel() {
123-
pixel.fire(SyncPixelName.SYNC_SIGNUP_DIRECT)
125+
override fun fireSignupDirectPixel(source: String?) {
126+
pixel.fire(SyncPixelName.SYNC_SIGNUP_DIRECT, buildSourceMap(source))
124127
}
125128

126129
override fun fireSyncAccountErrorPixel(
@@ -244,6 +247,14 @@ class RealSyncPixels @Inject constructor(
244247
return "${this}_timestamp"
245248
}
246249

250+
private fun buildSourceMap(source: String?): Map<String, String> {
251+
return if (source != null) {
252+
mapOf(SYNC_FEATURE_PROMOTION_SOURCE to source)
253+
} else {
254+
emptyMap()
255+
}
256+
}
257+
247258
companion object {
248259
private const val SYNC_PIXELS_PREF_FILE = "com.duckduckgo.sync.pixels.v1"
249260
}
@@ -283,6 +294,14 @@ enum class SyncPixelName(override val pixelName: String) : Pixel.PixelName {
283294
SYNC_OBJECT_LIMIT_EXCEEDED_DAILY("m_sync_%s_object_limit_exceeded_daily"),
284295
SYNC_REQUEST_SIZE_LIMIT_EXCEEDED_DAILY("m_sync_%s_request_size_limit_exceeded_daily"),
285296
SYNC_VALIDATION_ERROR_DAILY("m_sync_%s_validation_error_daily"),
297+
298+
SYNC_FEATURE_PROMOTION_DISPLAYED("sync_promotion_displayed"),
299+
SYNC_FEATURE_PROMOTION_CONFIRMED("sync_promotion_confirmed"),
300+
SYNC_FEATURE_PROMOTION_DISMISSED("sync_promotion_dismissed"),
301+
302+
SYNC_GET_OTHER_DEVICES_SCREEN_SHOWN("sync_get_other_devices"),
303+
SYNC_GET_OTHER_DEVICES_LINK_COPIED("sync_get_other_devices_copy"),
304+
SYNC_GET_OTHER_DEVICES_LINK_SHARED("sync_get_other_devices_share"),
286305
}
287306

288307
object SyncPixelParameters {
@@ -301,4 +320,6 @@ object SyncPixelParameters {
301320
const val ERROR_CODE = "code"
302321
const val ERROR_REASON = "reason"
303322
const val ERROR = "error"
323+
const val SYNC_FEATURE_PROMOTION_SOURCE = "source"
324+
const val GET_OTHER_DEVICES_SCREEN_LAUNCH_SOURCE = "source"
304325
}

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/SyncGetOnOtherPlatformsActivity.kt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ package com.duckduckgo.sync.impl.promotion
1818

1919
import android.annotation.SuppressLint
2020
import android.content.ActivityNotFoundException
21-
import android.content.Context
2221
import android.content.Intent
2322
import android.os.Bundle
2423
import androidx.lifecycle.Lifecycle
2524
import androidx.lifecycle.flowWithLifecycle
2625
import androidx.lifecycle.lifecycleScope
26+
import com.duckduckgo.anvil.annotations.ContributeToActivityStarter
2727
import com.duckduckgo.anvil.annotations.InjectWith
2828
import com.duckduckgo.common.ui.DuckDuckGoActivity
2929
import com.duckduckgo.common.ui.viewbinding.viewBinding
3030
import com.duckduckgo.di.scopes.ActivityScope
3131
import com.duckduckgo.navigation.api.GlobalActivityStarter
32+
import com.duckduckgo.navigation.api.getActivityParams
3233
import com.duckduckgo.sync.impl.R
3334
import com.duckduckgo.sync.impl.databinding.ActivitySyncGetOnOtherDevicesBinding
3435
import com.duckduckgo.sync.impl.promotion.SyncGetOnOtherPlatformsViewModel.Command
@@ -41,6 +42,7 @@ import kotlinx.coroutines.flow.onEach
4142
import timber.log.Timber
4243

4344
@InjectWith(ActivityScope::class)
45+
@ContributeToActivityStarter(SyncGetOnOtherPlatformsParams::class)
4446
class SyncGetOnOtherPlatformsActivity : DuckDuckGoActivity() {
4547

4648
private val viewModel: SyncGetOnOtherPlatformsViewModel by bindViewModel()
@@ -59,14 +61,17 @@ class SyncGetOnOtherPlatformsActivity : DuckDuckGoActivity() {
5961
setContentView(binding.root)
6062
setupToolbar(binding.includeToolbar.toolbar)
6163
configureUiEventHandlers()
64+
if (savedInstanceState == null) {
65+
viewModel.onScreenShownToUser(extractLaunchSource())
66+
}
6267
}
6368

6469
private fun configureUiEventHandlers() {
6570
binding.shareLinkButton.setOnClickListener {
66-
viewModel.onShareClicked()
71+
viewModel.onShareClicked(extractLaunchSource())
6772
}
6873
binding.downloadLinkText.setOnClickListener {
69-
viewModel.onLinkClicked()
74+
viewModel.onLinkClicked(extractLaunchSource())
7075
}
7176
}
7277

@@ -96,9 +101,9 @@ class SyncGetOnOtherPlatformsActivity : DuckDuckGoActivity() {
96101
}
97102
}
98103

99-
companion object {
100-
fun intent(context: Context): Intent {
101-
return Intent(context, SyncGetOnOtherPlatformsActivity::class.java)
102-
}
104+
private fun extractLaunchSource(): String? {
105+
return intent.getActivityParams(SyncGetOnOtherPlatformsParams::class.java)?.source
103106
}
104107
}
108+
109+
data class SyncGetOnOtherPlatformsParams(val source: String?) : GlobalActivityStarter.ActivityParams

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/SyncGetOnOtherPlatformsViewModel.kt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import com.duckduckgo.app.clipboard.ClipboardInteractor
2323
import com.duckduckgo.app.statistics.pixels.Pixel
2424
import com.duckduckgo.common.utils.DispatcherProvider
2525
import com.duckduckgo.di.scopes.ActivityScope
26+
import com.duckduckgo.sync.impl.pixels.SyncPixelName
27+
import com.duckduckgo.sync.impl.pixels.SyncPixelParameters.GET_OTHER_DEVICES_SCREEN_LAUNCH_SOURCE
2628
import com.duckduckgo.sync.impl.promotion.SyncGetOnOtherPlatformsViewModel.Command.ShareLink
2729
import com.duckduckgo.sync.impl.promotion.SyncGetOnOtherPlatformsViewModel.Command.ShowCopiedNotification
2830
import javax.inject.Inject
@@ -48,28 +50,40 @@ class SyncGetOnOtherPlatformsViewModel @Inject constructor(
4850

4951
data class ViewState(val windowsFeatureEnabled: Boolean)
5052

51-
fun onShareClicked() {
53+
fun onShareClicked(launchSource: String?) {
5254
viewModelScope.launch {
5355
commandChannel.send(ShareLink(buildLink()))
5456

55-
// todo - pixels
57+
pixel.fire(SyncPixelName.SYNC_GET_OTHER_DEVICES_LINK_SHARED, buildSourceMap(launchSource))
5658
}
5759
}
5860

59-
fun onLinkClicked() {
61+
fun onLinkClicked(launchSource: String?) {
6062
viewModelScope.launch(dispatchers.io()) {
6163
if (!clipboardInteractor.copyToClipboard(buildLink(), isSensitive = false)) {
6264
commandChannel.send(ShowCopiedNotification)
6365
}
6466

65-
// todo - pixels
67+
pixel.fire(SyncPixelName.SYNC_GET_OTHER_DEVICES_LINK_COPIED, buildSourceMap(launchSource))
6668
}
6769
}
6870

6971
private fun buildLink(): String {
7072
return "$BASE_LINK?$ATTRIBUTION"
7173
}
7274

75+
fun onScreenShownToUser(launchSource: String?) {
76+
pixel.fire(SyncPixelName.SYNC_GET_OTHER_DEVICES_SCREEN_SHOWN, buildSourceMap(launchSource))
77+
}
78+
79+
private fun buildSourceMap(source: String?): Map<String, String> {
80+
return if (source != null) {
81+
mapOf(GET_OTHER_DEVICES_SCREEN_LAUNCH_SOURCE to source)
82+
} else {
83+
emptyMap()
84+
}
85+
}
86+
7387
companion object {
7488
private const val BASE_LINK = "https://duckduckgo.com/app"
7589
private const val ATTRIBUTION = "origin=funnel_browser_android_sync"

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/SyncBookmarksPromotion.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ import com.duckduckgo.di.scopes.ViewScope
3434
import com.duckduckgo.navigation.api.GlobalActivityStarter
3535
import com.duckduckgo.savedsites.api.promotion.BookmarksScreenPromotionPlugin
3636
import com.duckduckgo.savedsites.api.promotion.BookmarksScreenPromotionPlugin.Callback
37-
import com.duckduckgo.sync.api.SyncActivityWithEmptyParams
3837
import com.duckduckgo.sync.impl.R
3938
import com.duckduckgo.sync.impl.databinding.ViewSyncPromoBinding
4039
import com.duckduckgo.sync.impl.promotion.SyncPromotions
4140
import com.duckduckgo.sync.impl.promotion.bookmarks.SyncBookmarksPromotionViewModel.Command
4241
import com.duckduckgo.sync.impl.promotion.bookmarks.SyncBookmarksPromotionViewModel.Command.LaunchSyncSettings
4342
import com.duckduckgo.sync.impl.promotion.bookmarks.SyncBookmarksPromotionViewModel.Command.ReevalutePromo
43+
import com.duckduckgo.sync.impl.ui.SyncActivityWithSourceParams
4444
import com.squareup.anvil.annotations.ContributesMultibinding
4545
import dagger.android.support.AndroidSupportInjection
4646
import javax.inject.Inject
@@ -99,6 +99,8 @@ class SyncBookmarksPromotionView @JvmOverloads constructor(
9999
.launchIn(coroutineScope)
100100

101101
configureMessage()
102+
103+
viewModel.onPromoShown()
102104
}
103105

104106
override fun onDetachedFromWindow() {
@@ -120,7 +122,7 @@ class SyncBookmarksPromotionView @JvmOverloads constructor(
120122

121123
private fun launchSyncSettings() {
122124
context?.let {
123-
val intent = globalActivityStarter.startIntent(it, SyncActivityWithEmptyParams)
125+
val intent = globalActivityStarter.startIntent(it, SyncActivityWithSourceParams(source = "promotion_bookmarks"))
124126
context.startActivity(intent)
125127
}
126128
}

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/SyncBookmarksPromotionViewModel.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ package com.duckduckgo.sync.impl.promotion.bookmarks
1919
import androidx.lifecycle.ViewModel
2020
import androidx.lifecycle.viewModelScope
2121
import com.duckduckgo.anvil.annotations.ContributesViewModel
22+
import com.duckduckgo.app.statistics.pixels.Pixel
2223
import com.duckduckgo.di.scopes.ViewScope
24+
import com.duckduckgo.sync.impl.pixels.SyncPixelName
25+
import com.duckduckgo.sync.impl.pixels.SyncPixelParameters
2326
import com.duckduckgo.sync.impl.promotion.SyncPromotions
2427
import com.duckduckgo.sync.impl.promotion.bookmarks.SyncBookmarksPromotionViewModel.Command.LaunchSyncSettings
2528
import com.duckduckgo.sync.impl.promotion.bookmarks.SyncBookmarksPromotionViewModel.Command.ReevalutePromo
@@ -33,6 +36,7 @@ import kotlinx.coroutines.launch
3336
@ContributesViewModel(ViewScope::class)
3437
class SyncBookmarksPromotionViewModel @Inject constructor(
3538
private val syncPromotions: SyncPromotions,
39+
private val pixel: Pixel,
3640
) : ViewModel() {
3741

3842
sealed interface Command {
@@ -47,12 +51,20 @@ class SyncBookmarksPromotionViewModel @Inject constructor(
4751
viewModelScope.launch {
4852
command.send(LaunchSyncSettings)
4953
}
54+
pixel.fire(SyncPixelName.SYNC_FEATURE_PROMOTION_CONFIRMED, sourceMap())
5055
}
5156

5257
fun onUserCancelledSyncPromo() {
5358
viewModelScope.launch {
5459
syncPromotions.recordBookmarksPromotionDismissed()
5560
command.send(ReevalutePromo)
5661
}
62+
pixel.fire(SyncPixelName.SYNC_FEATURE_PROMOTION_DISMISSED, sourceMap())
5763
}
64+
65+
fun onPromoShown() {
66+
pixel.fire(SyncPixelName.SYNC_FEATURE_PROMOTION_DISPLAYED, sourceMap())
67+
}
68+
69+
private fun sourceMap() = mapOf(SyncPixelParameters.SYNC_FEATURE_PROMOTION_SOURCE to "bookmarks")
5870
}

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/passwords/SyncPasswordsPromotion.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ import com.duckduckgo.common.utils.ViewViewModelFactory
3434
import com.duckduckgo.di.scopes.AppScope
3535
import com.duckduckgo.di.scopes.ViewScope
3636
import com.duckduckgo.navigation.api.GlobalActivityStarter
37-
import com.duckduckgo.sync.api.SyncActivityWithEmptyParams
3837
import com.duckduckgo.sync.impl.R
3938
import com.duckduckgo.sync.impl.databinding.ViewSyncPromoBinding
4039
import com.duckduckgo.sync.impl.promotion.SyncPromotions
4140
import com.duckduckgo.sync.impl.promotion.passwords.SyncPasswordsPromotionViewModel.Command
4241
import com.duckduckgo.sync.impl.promotion.passwords.SyncPasswordsPromotionViewModel.Command.LaunchSyncSettings
4342
import com.duckduckgo.sync.impl.promotion.passwords.SyncPasswordsPromotionViewModel.Command.ReevalutePromo
43+
import com.duckduckgo.sync.impl.ui.SyncActivityWithSourceParams
4444
import com.squareup.anvil.annotations.ContributesMultibinding
4545
import dagger.android.support.AndroidSupportInjection
4646
import javax.inject.Inject
@@ -99,6 +99,8 @@ class SyncPasswordsPromotionView @JvmOverloads constructor(
9999
.launchIn(coroutineScope)
100100

101101
configureMessage()
102+
103+
viewModel.onPromoShown()
102104
}
103105

104106
override fun onDetachedFromWindow() {
@@ -120,7 +122,7 @@ class SyncPasswordsPromotionView @JvmOverloads constructor(
120122

121123
private fun launchSyncSettings() {
122124
context?.let {
123-
val intent = globalActivityStarter.startIntent(it, SyncActivityWithEmptyParams)
125+
val intent = globalActivityStarter.startIntent(it, SyncActivityWithSourceParams(source = "promotion_passwords"))
124126
context.startActivity(intent)
125127
}
126128
}

sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/passwords/SyncPasswordsPromotionViewModel.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ package com.duckduckgo.sync.impl.promotion.passwords
1919
import androidx.lifecycle.ViewModel
2020
import androidx.lifecycle.viewModelScope
2121
import com.duckduckgo.anvil.annotations.ContributesViewModel
22+
import com.duckduckgo.app.statistics.pixels.Pixel
2223
import com.duckduckgo.di.scopes.ViewScope
24+
import com.duckduckgo.sync.impl.pixels.SyncPixelName
25+
import com.duckduckgo.sync.impl.pixels.SyncPixelParameters
2326
import com.duckduckgo.sync.impl.promotion.SyncPromotions
2427
import com.duckduckgo.sync.impl.promotion.passwords.SyncPasswordsPromotionViewModel.Command.LaunchSyncSettings
2528
import com.duckduckgo.sync.impl.promotion.passwords.SyncPasswordsPromotionViewModel.Command.ReevalutePromo
@@ -33,6 +36,7 @@ import kotlinx.coroutines.launch
3336
@ContributesViewModel(ViewScope::class)
3437
class SyncPasswordsPromotionViewModel @Inject constructor(
3538
private val syncPromotions: SyncPromotions,
39+
private val pixel: Pixel,
3640
) : ViewModel() {
3741

3842
sealed interface Command {
@@ -47,12 +51,20 @@ class SyncPasswordsPromotionViewModel @Inject constructor(
4751
viewModelScope.launch {
4852
command.send(LaunchSyncSettings)
4953
}
54+
pixel.fire(SyncPixelName.SYNC_FEATURE_PROMOTION_CONFIRMED, sourceMap())
5055
}
5156

5257
fun onUserCancelledSyncPromo() {
5358
viewModelScope.launch {
5459
syncPromotions.recordPasswordsPromotionDismissed()
5560
command.send(ReevalutePromo)
5661
}
62+
pixel.fire(SyncPixelName.SYNC_FEATURE_PROMOTION_DISMISSED, sourceMap())
5763
}
64+
65+
fun onPromoShown() {
66+
pixel.fire(SyncPixelName.SYNC_FEATURE_PROMOTION_DISPLAYED, sourceMap())
67+
}
68+
69+
private fun sourceMap() = mapOf(SyncPixelParameters.SYNC_FEATURE_PROMOTION_SOURCE to "passwords")
5870
}

0 commit comments

Comments
 (0)