Collect custom customer attributes

Build a simple form to collect custom customer attributes, store them into a customer metafield and optionally sync them with Klaviyo.

Demo (screen recording)

Syncing with Klaviyo is only available for customer type resource

Steps

  1. Create a Raven to carry customer attributes payload, if you want to sync with Klaviyo, select "Sync with Klaviyo" and add Klaviyo private API key (demo).

  2. Add raven id to raven-mac-gen liquid code snippet along with resource_id

  3. Write a little bit of Liquid, HTML, CSS, and Javascript.

  4. πŸŽ‰

I used Tailwind CSS to style the form and AlpineJS to manage the state of the form and UI updates.

Code

Last updated