0

Looking for most recent Google Analytics 4 for Android custom Events implementation / example / instructions. Specifically looking for:

  • Java or Kotlin code needed to send custom events with custom parameters
  • Additional steps in Google Analytics admin for creating custom definitions / parameters

I'm not looking for old Firebase events as this is now part of GA4 - its different now.

Google's help for this shows a video with web examples that are not applicable to Android directly.

So, a recent implementation or code sample would be very helpful.

1 Answer 1

0

Here is a link to Google's official documentation on sending custom events with custom parameters in Google Analytics 4 for Android:

https://developers.google.com/analytics/devguides/collection/android/v4/events

Here is an example of code for sending custom events with custom parameters in Google Analytics 4 for Android using Java:

// Get the tracker.
Tracker tracker = getDefaultTracker();

// Build and send the custom event.
tracker.send(
    new HitBuilders.EventBuilder()
        .setCategory("Video")
        .setAction("Play")
        .setLabel("Trailer")
        .setValue(1)
Sign up to request clarification or add additional context in comments.

1 Comment

Google has provided some helpful documentation on how to implement custom events in Google Analytics 4 for Android. This includes a step-by-step guide on how to create custom events and parameters, as well as code samples in both Java and Kotlin. The guide can be found here: developers.google.com/analytics/devguides/collection/android/v4/… The code samples can be found here: developers.google.com/analytics/devguides/collection/android/v4/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.