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.

Demoarrow-up-right (screen recording)

circle-info

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 (demoarrow-up-right).

  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. πŸŽ‰

circle-info

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

Code

Last updated