Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions kits/rokt/rokt/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rokt Kit Integration

Check failure on line 1 in kits/rokt/rokt/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

prettier

Incorrect formatting, autoformat by running 'trunk fmt'

This directory contains the [Rokt](https://docs.rokt.com/) integration for the [mParticle Android SDK](https://github.com/mParticle/mparticle-android-sdk).

Expand Down Expand Up @@ -74,6 +74,36 @@
)
```

## Session management

Rokt sessions are managed automatically. Placements shown to the same user share one session, and **the kit ends the Rokt session whenever the mParticle user changes**:

| Identity transition | Rokt session |
|---|---|

Check notice on line 82 in kits/rokt/rokt/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD060)

[new] Table column style
| Anonymous user is identified (e.g. unknown on the payment page, known on the confirmation page) | **Kept** — same person, in-session state survives |
| A different user identifies or logs in | **Ended** — the next placement starts a new session |
| The current user logs out | **Ended** |

No integration code is needed for this behaviour.

### Self-service terminals (kiosks, shared devices)

Where a queue of unrelated customers uses one device, the recommended pattern is to **log the user out (or identify the next customer) between transactions** — the kit resets the Rokt session at that boundary, so each customer's placements and events land on their own session.

A manual reset is also available for explicit control, called on the Rokt SDK directly:

```kotlin
import com.rokt.roktsdk.Rokt

Rokt.clearSession()
```

Notes:

- The new session begins on the **next** `selectPlacements` call; `clearSession` only ends the current one.
- Calling `clearSession` with no active session (or before init) is a no-op, and it is safe to combine with the automatic behaviour — both converge on the same idempotent reset.
- Avoid enabling Rokt experience caching on shared terminals: a cached experience belongs to the customer it was fetched for.

## Documentation

[Rokt integration](https://docs.rokt.com/developers/integration-guides/android/overview)
Expand Down
Loading