Ecommerce6 min read•Audience: Marketers, Developers
Using PostBrix with Klaviyo
Import custom HTML into Klaviyo, convert customer profile tags to Django syntax, and configure product feed loops.
Key Takeaways
- In Klaviyo, navigate to Email Templates → Create Template → "Use Classic Editor" or "Import HTML".
- Klaviyo uses Django/Jinja template syntax: {{ person.first_name }} instead of {{firstName}}.
- Use Klaviyo’s mandatory unsubscribe tag: {% unsubscribe_link %}.
- Catalog loops use Django syntax: {% for item in event.Items %}.
Importing HTML into Klaviyo#
- In Klaviyo, navigate to Content → Templates → Create Template.
- Select Use Classic Editor or Import / Paste HTML.
- Paste your compiled PostBrix HTML.
- In the preview window, confirm that layout columns and colors appear as intended.
Klaviyo Tag Mapping Table#
Klaviyo relies on Django template variables:
- First Name:
{{ person.first_name|default:'Friend' }} - Email:
{{ person.email }} - City:
{{ person.city }} - Unsubscribe Link: In your footer link:
<a href="{% unsubscribe_link %}">Unsubscribe</a> - Manage Preferences:
<a href="{% manage_preferences_link %}">Preferences</a> - Organization Address:
{% organization_address %}
Frequently Asked Questions
Why does Klaviyo flag an error about unsubscribe links?
Klaviyo mandates {% unsubscribe_link %} in every campaign template. Replace any static or placeholder unsubscribe link with this exact Django tag.
Can I use dynamic e-commerce product feeds in imported HTML?
Yes. Use Klaviyo’s {% for item in event.Items %} loop syntax to repeat product thumbnail and price rows.