Skip to content

Conversation

@osilviotti
Copy link
Contributor

Events logged with a custom event name using:

MParticle.logEvent('Test event', MParticle.EventType.Other, { 'Test key': 'Test value' })

come through the to mParticle dashboard with an event name of RNMParticle:

Screenshot 2025-09-01 at 14 12 37

I believe this was introduced in 919c83c - the parameter name was changed from name to eventName between the java and kotlin files, but name is passed to MPEvent.Builder in both cases, so the kotlin version is picking up the module name RNMParticle.

This PR just changes the call to MPEvent.Builder to pass in eventName instead of name.

Copilot AI review requested due to automatic review settings September 1, 2025 13:23
@osilviotti osilviotti requested a review from a team as a code owner September 1, 2025 13:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes event name logging in Android where custom event names were incorrectly appearing as "RNMParticle" in the mParticle dashboard. This issue was introduced during the Java-to-Kotlin conversion when the parameter name changed from name to eventName but the builder call wasn't updated accordingly.

  • Updates MPEvent.Builder to use the correct parameter eventName instead of the incorrect name variable
  • Ensures custom event names are properly logged to the mParticle dashboard on Android

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@jamesnrokt jamesnrokt left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks for fixing this

@jamesnrokt jamesnrokt merged commit 8f8e59e into mParticle:main Sep 4, 2025
7 of 8 checks passed
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.

2 participants