Our Klaviyo Tips

How to integrate and use custom feeds in Klaviyo?

Comment intégrer et utiliser des flux personnalisés dans Klaviyo ?

Integrating custom web feeds into your Klaviyo campaigns represents an advanced strategy that radically transforms the effectiveness of your email marketing. This approach allows you to automatically incorporate dynamic and constantly updated content into your communications, thus offering a more relevant and engaging experience for your subscribers. In this detailed guide, you will discover how to set up, optimize, and fully exploit the potential of custom web feeds in Klaviyo.

What is a custom web feed in Klaviyo and why use it?

A custom web feed in Klaviyo is an advanced mechanism for dynamically extracting and displaying external data directly in your emails. Technically, it is a set of structured data in JSON or XML format, hosted at a publicly accessible URL, which Klaviyo automatically queries before each email send.

Strategic advantages of custom web feeds for your marketing

Integrating custom web feeds into your Klaviyo strategy offers many concrete benefits:

  • Always up-to-date content: Your emails automatically display the latest information without requiring manual modifications.
  • Advanced personalization: Combine feed data with customer information to create highly targeted experiences.
  • Considerable time saving: Maintain a single email template that updates automatically with each send.
  • Maximum flexibility: Quickly adapt your marketing content without having to modify each campaign individually.
  • Improved performance: Increase your open and conversion rates with more relevant and recent content.

Common use cases for web feeds in Klaviyo

The practical applications of custom web feeds are numerous:

  • Displaying the latest blog posts or news
  • Presenting recently added products to your catalog
  • Integrating user-generated content (reviews, testimonials)
  • Automatic updating of promotions and special offers
  • Sharing weather data or localized events
  • Displaying the latest sports scores or competition results
  • Integrating relevant industry news RSS feeds

 

Technical setup of a custom web feed in Klaviyo: step-by-step guide

1. Preparing your data source

Before integrating your feed into Klaviyo, ensure it meets these essential technical criteria:

  • Data format: Your feed must be structured in JSON or XML, with a logical and consistent organization.
  • Accessible hosting: The file must be available at a public URL without authentication.
  • Optimal performance: The loading time should not exceed 5 seconds to allow for frequent updates.
  • Reasonable size: The file should not exceed 3.3 MB to ensure efficient processing.
  • Consistent structure: Maintain a uniform data organization to facilitate extraction.
  • No redirects: The URL must point directly to the file without intermediate redirection.

Technical tip: Test your feed with a tool like Postman or a simple web browser to verify that it responds correctly and quickly before integrating it into Klaviyo.

2. Adding the web feed to your Klaviyo account

Follow this precise process to integrate your feed into Klaviyo:

  1. Log in to your Klaviyo account.
  2. Click on your username or profile at the bottom left of the interface.
  3. Select Settings from the dropdown menu.
  4. In the left navigation panel, click on the Other tab.
  5. Choose Web Feeds from the available options.
  6. Click the Add Web Feed button.
  7. Complete the configuration form with the following information:
    • Feed Name: Assign a descriptive and easily identifiable name.
    • Feed URL: Enter the exact address where your JSON or XML file is hosted.
    • Request Method: Select GET (standard method for retrieving data).
    • Content Type: Choose JSON or XML depending on your feed's format.
  8. Click Add Web Feed to finalize the configuration.

Klaviyo will immediately begin syncing your feed and will continue to update it automatically based on your data source's performance.

3. Managing refresh settings

Klaviyo automatically determines your feed's refresh frequency based on its performance:

  • Fast refresh (every 15 minutes): If your feed responds in less than 5 seconds.
  • Daily refresh: If the response time exceeds 5 seconds.
  • Manual refresh: Available at any time via the "Refresh now" button.

To optimize the refresh frequency, improve your data source's performance by:

  • Compressing the file.
  • Optimizing the JSON/XML structure.
  • Hosting the feed on a high-performance server.
  • Limiting the amount of data to only what is strictly necessary.

 

Integrating the web feed into your Klaviyo email campaigns

1. Accessing feed data in the email editor

To use your feed data in an email:

  1. Create a new template or modify an existing template in Klaviyo.
  2. Position your cursor where you want to insert the feed content.
  3. Open the code editor or use a text block as needed.
  4. Use Klaviyo's variable syntax to access the feed data.

2. Syntax for data extraction and display

For a JSON feed, use the following syntax:

{% web_feed ‘FEED_NAME’ %}

  <!-- Your code using the feed data -->

  {{ feed_data.property_name }}

{% endweb_feed %}

For complex data structures, you can use loops:

{% web_feed ‘FEED_NAME’ %}

  {% for item in feed_data.items %}

    <div class=”article”>

      <h3>{{ item.title }}</h3>

      <p>{{ item.description }}</p>

      <a href=”{{ item.link }}”>Read more</a>

    </div>

  {% endfor %}

{% endweb_feed %}

3. Practical integration examples

Displaying the latest blog posts

{% web_feed ‘blog_articles’ %}

  <h2>Our latest articles</h2>

  <div class=”articles-container”>

    {% for article in feed_data.articles limit:3 %}

      <div class=”article-card”>

        <img src=”{{ article.image_url }}” alt=”{{ article.title }}”>

        <h3>{{ article.title }}</h3>

        <p>{{ article.excerpt | truncate: 100 }}</p>

        <a href=”{{ article.url }}” class=”btn”>Read article</a>

      </div>

    {% endfor %}

  </div>

{% endweb_feed %}

Integrating promotional products

{% web_feed ‘promotions_feed’ %}

  <h2>Special offers this week</h2>

  <div class=”products-grid”>

    {% for product in feed_data.products %}

      {% if product.discount > 15 %}

        <div class=”product”>

          <span class=”discount-badge”>-{{ product.discount }}%</span>

          <img src=”{{ product.image }}” alt=”{{ product.name }}”>

          <h3>{{ product.name }}</h3>

          <div class=”price”>

            <span class=”original”>{{ product.original_price }}€</span>

            <span class=”discounted”>{{ product.discounted_price }}€</span>

          </div>

          <a href=”{{ product.url }}” class=”cta-button”>View offer</a>

        </div>

      {% endif %}

    {% endfor %}

  </div>

{% endweb_feed %}

4. Error handling and fallback content

To ensure the robustness of your emails, implement fallback content:

{% web_feed ‘FEED_NAME’ %}

  {% if feed_data %}

    <!-- Your code using the feed data -->

  {% else %}

    <!-- Alternative content in case of failure -->

    <p>Discover our latest news on our website.</p>

  {% endif %}

{% endweb_feed %}

Advanced strategies for maximizing the impact of web feeds in Klaviyo

1. Contextual personalization based on user data

Combine feed data with customer information to create a hyper-personalized experience:

{% web_feed ‘products_feed’ %}

  <h2>Selected for you, {{ customer.first_name }}</h2>

  {% for product in feed_data.products %}

    {% if product.category == customer.preferred_category %}

      <!-- Product display -->

    {% endif %}

  {% endfor %}

{% endweb_feed %}

2. Dynamic segmentation based on feed content

Use feed data to condition the sending of certain segments:

  1. Create a campaign with dynamic content based on your feed.
  2. Define segmentation conditions using this data.
  3. Schedule recurring sends that will automatically adapt to updated content.

3. Using temporal and contextual data

Integrate contextual elements to enhance relevance:

{% web_feed ‘events_feed’ %}

  <h2>Events near {{ customer.city }}</h2>

  {% for event in feed_data.events %}

    {% if event.location == customer.city and event.date > ‘now’ | date: ‘%Y-%m-%d’ %}

      <!-- Event display -->

    {% endif %}

  {% endfor %}

{% endweb_feed %}

4. A/B testing to optimize performance

Experiment with different approaches to using your feeds:

  • Test various data presentation formats.
  • Compare the effectiveness of different amounts of information (3 vs 5 articles).
  • Evaluate the impact of different refresh frequencies.
  • Analyze performance based on placement within the email.

 

Best practices and optimizations for your web feeds in Klaviyo

1. Technical optimization of feeds

To ensure optimal performance:

  • Minimize file size: Include only essential data.
  • Use GZIP compression: Reduce the volume of data transferred.
  • Cache responses: Implement a server-side caching system.
  • Optimize JSON/XML structure: Avoid excessive nesting.
  • Use a CDN: Distribute your feed via a content delivery network.

2. Maintenance and monitoring

Ensure the reliability of your system with these practices:

  • Regularly check the synchronization status in the Klaviyo interface.
  • Set up alerts in case of refresh failure.
  • Maintain clear documentation of your feed structure.
  • Systematically test after each structure modification.

3. Email design considerations

For an optimal user experience:

  • Responsive design: Ensure dynamic content adapts to all devices.
  • Loading time: Limit the number of images and heavy elements.
  • Graceful degradation: Provide an alternative text version for restrictive email clients.
  • Accessibility: Integrate alt attributes for images and maintain sufficient contrast.

 

Advanced use cases and inspiration

1. Dynamic newsletters based on current events

Create a weekly newsletter that automatically updates with the latest news from your industry, without manual intervention.

2. Promotional emails based on real-time inventory

Send promotions that automatically adapt to your current stock, thus avoiding highlighting out-of-stock products.

3. Personalized recommendations based on trends

Combine your customers' behavioral data with current trends to create hyper-relevant recommendations.

4. Timers and limited-time offers

Integrate dynamic timers for your flash sales, updating with each email open.

 

Conclusion: transforming your email marketing with custom web feeds

Integrating custom web feeds into Klaviyo represents a significant advancement in your email marketing strategy. This approach allows you to transcend the limitations of traditional static emails to deliver dynamic, personalized, and always up-to-date content to your audience.

By following the detailed steps in this guide and implementing the recommended best practices, you can create email campaigns that stand out for their relevance and freshness. This advanced strategy will not only save you valuable time in creating and updating your communications but also significantly improve subscriber engagement and conversion rates.

Custom web feeds in Klaviyo are a powerful growth lever for marketers looking to optimize their email strategy and deliver an exceptional user experience. Start exploring this advanced feature today to radically transform the effectiveness of your marketing campaigns.

Previous
How to create a back-in-stock flow on Klaviyo?
Next
How to embed discount codes into your Klaviyo pop-ups?

DON'T HAVE A KLAVIYO ACCOUNT?

Create yours in minutes!

CREATE A KLAVIYO ACCOUNT