Skip to content

Conversation

@aristidesstaffieri
Copy link
Contributor

Closes #2199

Adds platform field to metrics, in order to be able to key events by platform.

Copy link
Contributor

@CassioMG CassioMG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@CassioMG
Copy link
Contributor

I've just realized this looks like a duplicate of this other issue? #2393

@CassioMG
Copy link
Contributor

CassioMG commented Dec 12, 2025

@aristidesstaffieri can we also assign a Platform user property in addition to the event property?

On mobile we are setting both so we can easily filter users as well

@aristidesstaffieri
Copy link
Contributor Author

@aristidesstaffieri can we also assign a Platform user property in addition to the event property?

On mobile we are setting both so we can easily filter users as well

@CassioMG it looks like on mobile, we set a random ID for the user field in the same way the extension does today. Am I missing this somewhere else or are you suggesting we update both projects to use the real pub key?
https://github.com/stellar/freighter-mobile/blob/14f91c4e82d310f4d4db8812e461e450a31b0e10/src/services/analytics/user.ts#L37

@CassioMG
Copy link
Contributor

CassioMG commented Dec 13, 2025

@aristidesstaffieri can we also assign a Platform user property in addition to the event property?
On mobile we are setting both so we can easily filter users as well

@CassioMG it looks like on mobile, we set a random ID for the user field in the same way the extension does today. Am I missing this somewhere else or are you suggesting we update both projects to use the real pub key? https://github.com/stellar/freighter-mobile/blob/14f91c4e82d310f4d4db8812e461e450a31b0e10/src/services/analytics/user.ts#L37

@aristidesstaffieri it looks like this PR only adds the platform property to events. So in addition to adding to events I'm suggesting also adding it as a user property, which would allow us to easily filter user profiles on Amplitude by platform. Does that make sense?

See sample below:
Screenshot 2025-12-12 at 16 04 45

@aristidesstaffieri
Copy link
Contributor Author

aristidesstaffieri commented Dec 15, 2025

@aristidesstaffieri can we also assign a Platform user property in addition to the event property?
On mobile we are setting both so we can easily filter users as well

@CassioMG it looks like on mobile, we set a random ID for the user field in the same way the extension does today. Am I missing this somewhere else or are you suggesting we update both projects to use the real pub key? https://github.com/stellar/freighter-mobile/blob/14f91c4e82d310f4d4db8812e461e450a31b0e10/src/services/analytics/user.ts#L37

@aristidesstaffieri it looks like this PR only adds the platform property to events. So in addition to adding to events I'm suggesting also adding it as a user property, which would allow us to easily filter user profiles on Amplitude by platform. Does that make sense?

See sample below: Screenshot 2025-12-12 at 16 04 45

ok got it, it looks like mobile uses the sdk here in order to automatically add these properties. We should add separate task for this, the extension does not use the sdk at all right now or identify users so its a bigger line of work and unrelated to separating events by platform.

I made this one to track that refactor -> #2464

@CassioMG
Copy link
Contributor

ok got it, it looks like mobile uses the sdk here in order to automatically add these properties. We should add separate task for this, the extension does not use the sdk at all right now or identify users so its a bigger line of work and unrelated to separating events by platform.

I made this one to track that refactor -> #2464

Ah ok, got it that makes sense to me. Thanks for creating the ticket 👍

@aristidesstaffieri aristidesstaffieri merged commit 93f0fac into release/5.37.0 Dec 20, 2025
2 of 3 checks passed
@aristidesstaffieri aristidesstaffieri deleted the chore/amplitude-project-id branch December 20, 2025 01:00
piyalbasu added a commit that referenced this pull request Dec 29, 2025
* adds platform to events emitted

* fixes issue with missing translation helper and extra import (#2459)

* updates test tokens, improves test token references to reduce duplication

---------

Co-authored-by: Piyal Basu <pbasu235@gmail.com>
piyalbasu added a commit that referenced this pull request Jan 8, 2026
* adds platform to events emitted

* fixes issue with missing translation helper and extra import (#2459)

* updates test tokens, improves test token references to reduce duplication

---------

Co-authored-by: Piyal Basu <pbasu235@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants