Skip to content
Docs and guides

Help Center

Step-by-step guides for every setting in App Studio.

Klaviyo

Updated

Sync app profiles and push tokens to Klaviyo flows.

Enable a native plugin, configure its settings, then rebuild and install the app.
Native plugin changes require a new build. Follow this guide for the exact settings and supported methods.View full size
  • JavaScript: window.AppSorcerer.klaviyo
  • Plan: Plus (premium) — included on plans with premium plugins, and you can try it free for 14 days
  • Platforms: Android apps today. iOS support arrives with iOS builds (coming soon).
  • Android permissions: POST_NOTIFICATIONS
  • Needs: your Firebase google-services.json file, uploaded in Push Notifications

Turn the plugin on in App Studio → Plugins, fill in its settings, then rebuild your app. Websites call it through the JavaScript bridge.

Settings

Studio labelTypeDefaultNotes
Public API key (site ID)text–required

Setup

  1. Enter your Public API key (site ID).
  2. Upload your google-services.json in Push Notifications — Klaviyo push uses Firebase Cloud Messaging. The plugin registers the push token and records "Opened Push" automatically.
  3. Add your Firebase server credentials to Klaviyo (Settings → Push) to send pushes.

JavaScript API

Every method returns a Promise. Call it as await AppSorcerer.klaviyo.<method>(args).

MethodArgumentsNotes
setProfile{ email?, phoneNumber?, externalId?, firstName?, lastName?, organization?, title?, image?, address1?, address2?, city?, country?, region?, zip?, timezone?, latitude?, longitude?, properties?: {} }
setEmail / setPhoneNumber / setExternalId{ email } / { phoneNumber } / { externalId }
setProfileAttribute{ key, value }standard keys above or any custom key
createEvent{ name, value?, currency?, properties? }"Viewed Product", "Added to Cart", "Started Checkout", "Opened App" map to Klaviyo metrics; anything else is a custom metric
resetProfile–call on sign-out
getProfile–{ email, phoneNumber, externalId, pushToken }
getPushToken / setPushToken– / { token }
requestPushPermission–{ granted } (Android 13+ notification permission)

Errors

Rejections carry error.code: not_configured, invalid_args, klaviyo_error, unavailable, unknown_method.

Example

JavaScript
await AppSorcerer.klaviyo.setProfile({ email: customer.email, firstName: customer.firstName, externalId: customer.id });
await AppSorcerer.klaviyo.createEvent({ name: 'Viewed Product', value: 29.9, properties: { ProductID: 'SKU-1' } });
await AppSorcerer.klaviyo.requestPushPermission();

Notes

  • If Firebase (FCM) is also your provider in Push Notifications, contact support before turning on Klaviyo push: Android delivers each Firebase message to only one handler.
Was this helpful?