Skip to main content

Shopify Integration

Integrate Toggly feature flags with your Shopify store to control storefront visibility and run experiments.

Overview

The Toggly Shopify app allows you to:

  • Control storefront features without code deployments
  • Run A/B tests on product pages and checkout flows
  • Target features to specific customer segments
  • Monitor feature usage and business metrics

Installation

  1. Visit the Shopify App Store
  2. Click Add app
  3. Authorize Toggly to access your store
  4. Complete the setup wizard

Configuration

API Keys

After installation, configure your Toggly API keys:

  1. Navigate to Toggly Settings in your Shopify admin
  2. Enter your Toggly App Key and API Key
  3. Select your environment (Development, Staging, Production)
  4. Save settings

Feature Flags in Liquid

Use feature flags in your Shopify theme:

{% if toggly.is_feature_enabled('new-product-page') %}
{% render 'product-page-new' %}
{% else %}
{% render 'product-page-legacy' %}
{% endif %}

Multi-Variant Flags

{% assign button_color = toggly.get_feature_variant('checkout-button-color') %}

<button class="btn btn-{{ button_color }}">
Checkout
</button>

Use Cases

Show/Hide Banners

{% if toggly.is_feature_enabled('holiday-banner') %}
<div class="holiday-banner">
Special holiday promotion!
</div>
{% endif %}

A/B Testing Product Pages

{% assign variant = toggly.get_feature_variant('product-page-layout') %}

{% if variant == 'new-layout' %}
{% render 'product-page-new' %}
{% else %}
{% render 'product-page-legacy' %}
{% endif %}

Customer Segmentation

{% if customer.tags contains 'premium' %}
{% if toggly.is_feature_enabled('premium-features') %}
{% render 'premium-features' %}
{% endif %}
{% endif %}

Best Practices

  1. Test in Development: Test feature flags in a development theme first
  2. Use Segments: Target features to specific customer groups
  3. Monitor Metrics: Track feature usage and conversion rates
  4. Gradual Rollouts: Start with small percentages and increase gradually

Next Steps