Skip to content
Malouf Developer Docs

Email Integrations

We recently migrated from Drip to Klaviyo (Aug 2023). Due to some poor documentation on the Klaviyo side, below you will find a brief explaination on how to add custom properties.

Klaviyo Custom Properties

To push custom properties to a subscriber profile in Klaviyo, please use their JavaScript API for indentification and tracking. This method is being used on Malouf VIP to send the access code (custom property) to the Klaviyo user account.

DO NOT USE the Klaviyo create profile API reference. Due to the BigCommerce CORS policy you will not be able to complete a successful fetch request to the api within the theme.

Here is an example of the code required for user indentification or profile updates:

// Replace "PUBLIC_API_KEY" with your real API key.
<script
  async type="text/javascript"
  src="//static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"
></script>

<script>
  klaviyo.push(['identify', {
    '$email' : email,
    '$phone_number' : phone,
    'customPropertyName' : customValue
  }]);
</script>