To record an event, create an `AnalyticsEvent` and call `Amplify.Analytics.recordEvent()` to send it:

<BlockSwitcher>
<Block name="Java">

```java
import com.amplifyframework.analytics.AnalyticsEvent;
import com.amplifyframework.core.Amplify;
```

```java
AnalyticsEvent event = AnalyticsEvent.builder()
    .name("PasswordReset")
    .addProperty("Channel", "SMS")
    .addProperty("Successful", true)
    .addProperty("ProcessDuration", 792)
    .addProperty("UserAge", 120.3)
    .build();

Amplify.Analytics.recordEvent(event);
```

</Block>
<Block name="Kotlin">

```kotlin
import com.amplifyframework.analytics.AnalyticsEvent
import com.amplifyframework.core.Amplify
```

```kotlin
val event = AnalyticsEvent.builder()
    .name("PasswordReset")
    .addProperty("Channel", "SMS")
    .addProperty("Successful", true)
    .addProperty("ProcessDuration", 792)
    .addProperty("UserAge", 120.3)
    .build()

Amplify.Analytics.recordEvent(event)
```

</Block>
<Block name="RxJava">

```java
import com.amplifyframework.analytics.AnalyticsEvent;
import com.amplifyframework.rx.RxAmplify;
```

```java
AnalyticsEvent event = AnalyticsEvent.builder()
    .name("PasswordReset")
    .addProperty("Channel", "SMS")
    .addProperty("Successful", true)
    .addProperty("ProcessDuration", 792)
    .addProperty("UserAge", 120.3)
    .build();

RxAmplify.Analytics.recordEvent(event);
```

</Block>
</BlockSwitcher>
