UGC Reactions from Real Creators
Real creator library videos at $11 and images at $8. Custom production from $25/video with a $250 minimum. Commercial licensing included.
翻訳待ち
Hellotext JavaScript Client
翻訳待ち
Loading the full README.
Read the full README ↗Official Hellotext JavaScript library.
This library allows you the following,
npm i @hellotext/hellotext
yarn add @hellotext/hellotext
Import the library into your app.
import Hellotext from '@hellotext/hellotext'
If you're running in a non-browser environment, such as Node.js, you can import the vanilla implementation which only includes Hellotext.js class without initializing other libraries that rely on the browser environment.
import Hellotext from '@hellotext/hellotext/vanilla'
Initialize the library passing the public HELLOTEXT_BUSINESS_ID identifier that represents the business.
You can find it from the business's settings page.
Hellotext.initialize('HELLOTEXT_BUSINESS_ID')
Failing to initialize the class before calling any other method will throw a NotInitializedError.
Follow these guides to set up tracking, forms, chat widgets, popups, and Push notifications on your website.
Use Hellotext.on to listen for SDK events. The callback receives the event's payload directly.
Register listeners before Hellotext.initialize to receive events emitted during initialization.
Hellotext.on(eventName, callback)
To unsubscribe, pass the same callback to Hellotext.removeEventListener:
Hellotext.removeEventListener(eventName, callback)
| Event | When it fires | Callback payload |
|---|---|---|
session-set | The session value is set, including when an existing session is restored during initialization. | The current session value, also available as Hellotext.session. |
utm-set | The UTM parameters the visitor arrived with are saved. | A JSON string containing the saved UTM parameters and observed_at. Use JSON.parse to read it as an object. |
UTM parameters on links inside the site (a store's own popup, banner or menu link) do not replace the ones the visitor arrived with and do not fire utm-set. They are kept apart and sent with events as internal_utm_params. Hellotext's own UTMs always count as an arrival.
See Understanding Sessions and Tracking Events.
| Event | When it fires | Callback payload |
|---|---|---|
forms:collected | Forms found on the page have finished loading, before automatic mounting. | The FormCollection instance, with methods such as getById, getByIndex, and forEach. |
form:completed | A form completes, or a previously completed form is restored from local storage during mounting. | { id, state, data, completedAt }, where data contains the submitted values and completedAt is a timestamp in milliseconds. |
See Forms for collection, mounting, and completion details.
| Event | When it fires | Callback payload |
|---|---|---|
popup:mounted | A popup is mounted, before its initial display state is evaluated. | None. |
popup:opened | A popup dialog becomes visible. | None. |
popup:closed | A popup is dismissed. | None. |
See Popups for configuration and display behaviour.
Each alert event receives { kind }, where kind identifies the section: homepage,
product_collection, or product_details.
This is the beginning of the README. Read the rest at the original. Read the full README ↗