Skip to content

React

Installation

<script src="https://static.latta.ai/recorder/latta.js"></script>

Usage

<script>
Latta.init({
apiKey: 'YOUR_API_KEY'
});
</script>

Other options

console

/**
* Enable console logging
* @default true
*/
enabled?: boolean;
/**
* Which kinds of logs to log
* @default ['error']
*/
logLevel?: (keyof Logger)[];

These are the available logLevel types assert, clear, count, countReset, debug, dir, dirxml, error, group, groupCollapsed, groupEnd, info, log, table, time, timeEnd, timeLog, trace, warn,

fetch

/**
* Enable fetch logging
* @default true
*/
enabled?: boolean;

Latta can record network request using fetch.

mode

/**
* `manual` mode requires the user start and stop the recording, by default
* Latta records all the time and once the user saves a session it only saves the last 20 seconds (20 000 ms)
*
* @default '{ recording: "automatic"; checkoutLength: 20000 }'
*/
mode?: ModeOptions;

theme

/**
* Choose UI elements theme
*/
theme?: "light" | "dark" | "auto";

Latta shows a branded Latta button, this button then can be changed based on your needs

language

/**
* Language code in ISO 639-1
* Automatic will be choose if undefined
*/
language?: string;