Documentation / @frak-labs/core-sdk / actions / sendInteraction
Function: sendInteraction()
sendInteraction(
client,params):Promise<void>
Defined in: actions/sendInteraction.ts:43
Send an interaction to the backend via the listener RPC. Fire-and-forget: errors are caught and logged, not thrown.
Parameters
client
The Frak client instance
params
The interaction parameters
Returns
Promise<void>
Examples
Track a user arrival with referral attribution:
await sendInteraction(client, {
type: "arrival",
referrerWallet: "0x1234...abcd",
landingUrl: window.location.href,
utmSource: "twitter",
utmMedium: "social",
utmCampaign: "launch-2026",
});Track a sharing event:
await sendInteraction(client, { type: "sharing" });Send a custom interaction:
await sendInteraction(client, {
type: "custom",
customType: "newsletter_signup",
data: { email: "user@example.com" },
});