feat(Strava): Add Block Snowplow tracking patch (#6413)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
xehpuk
2025-12-29 22:20:26 +01:00
committed by GitHub
parent cebcfab86a
commit c47beae213
3 changed files with 30 additions and 0 deletions

View File

@@ -1192,6 +1192,10 @@ public final class app/revanced/patches/strava/password/EnablePasswordLoginPatch
public static final fun getEnablePasswordLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/strava/snowplow/BlockSnowplowTrackingPatchKt {
public static final fun getBlockSnowplowTrackingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/strava/subscription/UnlockSubscriptionPatchKt {
public static final fun getUnlockSubscriptionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View File

@@ -0,0 +1,17 @@
package app.revanced.patches.strava.privacy
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val blockSnowplowTrackingPatch = bytecodePatch(
name = "Block Snowplow tracking",
description = "Blocks Snowplow analytics. See https://snowplow.io for more information.",
) {
compatibleWith("com.strava")
execute {
// Keep events list empty, otherwise sent to https://c.strava.com/com.snowplowanalytics.snowplow/tp2.
insertEventFingerprint.method.returnEarly()
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.strava.privacy
import app.revanced.patcher.fingerprint
// https://github.com/snowplow/snowplow-android-tracker/blob/2.2.0/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/internal/emitter/storage/SQLiteEventStore.java#L130
// Not the exact same code (e.g. returns void instead of long), even though the version number matches.
internal val insertEventFingerprint = fingerprint {
strings("Added event to database: %s")
}