Liquid Course for ConvertKit

Practical Examples

Real-world examples of Liquid in ConvertKit

In this section, we'll explore real-world examples of how to use Liquid in ConvertKit to create powerful, personalized email campaigns.

Email Personalization

Welcome Series

{% if subscriber.first_name %}
  Hi {{ subscriber.first_name }},
{% else %}
  Hi there,
{% endif %}
 
Welcome to {{ form.name }}! We're excited to have you join our community.
 
{% if subscriber.tags contains "customer" %}
  As a valued customer, you'll receive exclusive content and offers.
{% endif %}
 
Here's what you can expect:
1. Weekly tips and insights
2. Exclusive content
3. Special offers
 
{% if subscriber.custom_fields.interest %}
  We noticed you're interested in {{ subscriber.custom_fields.interest }}.
  We'll make sure to send you relevant content in that area.
{% endif %}

Sequence Progress Tracking

{% if sequence.step_number == 1 %}
  Welcome to Day 1 of our {{ sequence.name }}!
{% elsif sequence.step_number == sequence.total_steps %}
  Congratulations! You've completed our {{ sequence.name }}!
{% else %}
  Welcome to Day {{ sequence.step_number }} of {{ sequence.total_steps }} in our {{ sequence.name }}!
{% endif %}

Dynamic Content Blocks

Product Recommendations

{% if subscriber.custom_fields.last_viewed_category %}
  <h2>More in {{ subscriber.custom_fields.last_viewed_category }}</h2>
  {% for product in products %}
    {% if product.category == subscriber.custom_fields.last_viewed_category %}
      <div class="product-card">
        <h3>{{ product.name }}</h3>
        <p>{{ product.description }}</p>
        {% if subscriber.tags contains "vip" %}
          <p class="price">VIP Price: ${{ product.price | times: 0.8 | round: 2 }}</p>
        {% else %}
          <p class="price">Price: ${{ product.price }}</p>
        {% endif %}
      </div>
    {% endif %}
  {% endfor %}
{% endif %}

Tag-Based Content

{% if subscriber.tags contains "free-trial" %}
  <div class="trial-reminder">
    Your free trial ends in {{ subscriber.custom_fields.trial_days_remaining }} days!
    <a href="/upgrade">Upgrade now</a> to keep your access.
  </div>
{% endif %}
 
{% if subscriber.tags contains "annual-subscriber" %}
  <div class="renewal-notice">
    Your annual subscription renews on {{ subscriber.custom_fields.renewal_date | date: "%B %d, %Y" }}.
  </div>
{% endif %}

Automation Workflows

Abandoned Cart Reminder

{% if subscriber.custom_fields.abandoned_cart %}
  <h2>Your Cart is Waiting!</h2>
 
  <p>We noticed you left some items in your cart:</p>
  <ul>
  {% for item in subscriber.custom_fields.abandoned_cart.items %}
    <li>
      {{ item.name }} - ${{ item.price }}
      {% if item.quantity > 1 %}
        ({{ item.quantity }} items)
      {% endif %}
    </li>
  {% endfor %}
  </ul>
 
  <p>Total: ${{ subscriber.custom_fields.abandoned_cart.total }}</p>
 
  {% if subscriber.custom_fields.last_purchase_date %}
    {% assign days_since_last_purchase = "now" | date: "%s" | minus: subscriber.custom_fields.last_purchase_date | date: "%s" | divided_by: 86400 %}
    {% if days_since_last_purchase > 30 %}
      <p>As a returning customer, here's a special 10% discount!</p>
    {% endif %}
  {% endif %}
{% endif %}

Course Progress Tracking

{% if subscriber.custom_fields.course_progress %}
  <h2>Your Learning Progress</h2>
 
  <div class="progress-summary">
    {% assign completed_lessons = subscriber.custom_fields.course_progress.completed_lessons | size %}
    {% assign total_lessons = subscriber.custom_fields.course_progress.total_lessons %}
    {% assign progress_percentage = completed_lessons | times: 100 | divided_by: total_lessons %}
 
    <p>You've completed {{ completed_lessons }} of {{ total_lessons }} lessons ({{ progress_percentage }}%)</p>
 
    {% if completed_lessons == total_lessons %}
      <div class="completion-badge">
        Congratulations! You've completed the course!
      </div>
    {% else %}
      <p>Next up: {{ subscriber.custom_fields.course_progress.next_lesson }}</p>
    {% endif %}
  </div>
{% endif %}

Form Customization

Dynamic Form Fields

{% if subscriber.custom_fields.account_type == "business" %}
  <div class="form-field">
    <label>Company Name</label>
    <input type="text" name="company_name" value="{{ subscriber.custom_fields.company_name }}">
  </div>
{% endif %}
 
{% if subscriber.custom_fields.industry %}
  <div class="form-field">
    <label>Industry</label>
    <select name="industry">
      {% for industry in industries %}
        <option value="{{ industry }}" {% if industry == subscriber.custom_fields.industry %}selected{% endif %}>
          {{ industry }}
        </option>
      {% endfor %}
    </select>
  </div>
{% endif %}

Conditional Form Sections

{% if subscriber.tags contains "customer" %}
  <div class="customer-feedback">
    <h3>How was your experience?</h3>
    <select name="satisfaction">
      <option value="very-satisfied">Very Satisfied</option>
      <option value="satisfied">Satisfied</option>
      <option value="neutral">Neutral</option>
      <option value="dissatisfied">Dissatisfied</option>
    </select>
  </div>
{% endif %}
 
{% if subscriber.custom_fields.purchase_count > 1 %}
  <div class="loyalty-program">
    <h3>Join our Loyalty Program</h3>
    <p>As a repeat customer, you're eligible for our loyalty program!</p>
    <input type="checkbox" name="join_loyalty" checked>
    <label>Yes, I want to join the loyalty program</label>
  </div>
{% endif %}

Best Practices for Implementation

  1. Test Thoroughly: Always test your templates with different subscriber data
  2. Fallback Content: Provide default content for when variables are missing
  3. Performance: Keep complex operations to a minimum
  4. Maintainability: Use comments and organize your code logically
  5. Error Handling: Account for potential missing or invalid data

Next Steps

Now that you've seen these practical examples, you're ready to start implementing Liquid in your ConvertKit campaigns! Remember to:

  1. Start with simple personalization
  2. Gradually add more complex features
  3. Test each change thoroughly
  4. Monitor the results and optimize

Need more help? Check out the ConvertKit documentation for additional resources and support.

🚀 Early Access - 50% OFF

Give Your Visitors
the Proof They Need

ProofyBubble turns casual visitors into customers by leveraging social proof to build trust and credibility.

Buy once, yours forever
1-minute setup
Increase Conversion Rate
Get Lifetime Access

30-day money-back guarantee

Profile

"When I launched my course, ProofyBubble helped me get 100+ sales in the first month!"

Ankita Kulkarni • 13.2K YouTube Subscribers