{# Premium Insights panel for the Seller Dashboard. Purely presentational — every number is precomputed by app/marketplace/analytics.get_dashboard_analytics(). Expects `is_premium` and `analytics` (None for free members). #} {% from "components/premium_badge.html" import premium_badge_pill %}

Premium Insights

Understand how your listings are performing.

{% if is_premium %}{{ premium_badge_pill('Premium', 'sm') }}{% endif %}
{% if not is_premium %} {# ---------- Free: upgrade card ---------- #}

Unlock Premium Insights

See exactly how buyers engage with your listings.

  • Performance analytics
  • Conversion rate
  • Listing trends
  • Best performing items
Upgrade to Premium
{% elif not analytics.has_data %} {# ---------- Premium, but no listings yet ---------- #}

No analytics available yet.

List an item to start tracking views, favorites and offers here. Add clear photos and a fair price to attract more buyers.

{% else %} {% set s = analytics.summary %} {# ---------- Summary metrics (compact) ---------- #}
{% for label, value in [ ('Listing Views', '{:,}'.format(s.listing_views)), ('Favorites', '{:,}'.format(s.favorites)), ('Messages', '{:,}'.format(s.messages)), ('Offers', '{:,}'.format(s.offers)), ('Completed Sales', '{:,}'.format(s.completed_sales)), ('Avg. Rating', ('%.1f ★'|format(s.average_rating)) if s.review_count else '—'), ('Conversion Rate', '%.0f%%'|format(s.conversion_rate)), ] %}
{{ value }}
{{ label }}
{% endfor %}
{# ---------- Weekly trends (no charts) ---------- #}
This Week
{% for label, value in [('Views', analytics.weekly.views), ('Favorites', analytics.weekly.favorites), ('Messages', analytics.weekly.messages), ('Offers', analytics.weekly.offers)] %}
+{{ "{:,}".format(value) }}{{ label }}
{% endfor %}
{# ---------- Best performing listing ---------- #} {% if analytics.best_listing %} {% set b = analytics.best_listing %}
Best performer
{% if b.cover %} {% else %}{% endif %}

{{ b.title }}

  • {{ "{:,}".format(b.views) }} views
  • {{ "{:,}".format(b.favorites) }} saves
  • {{ "{:,}".format(b.offers) }} offers
  • {{ "%.0f%%"|format(b.conversion) }} conv.
View Listing
{% endif %} {# ---------- Recommendations ---------- #} {% if analytics.recommendations %}
Recommendations
    {% for rec in analytics.recommendations %}
  • {{ rec }}
  • {% endfor %}
{% endif %}
{# ---------- Listing performance table (sorted by best performance) ---------- #}
Listing performance
{% for row in analytics.listings %} {% endfor %}
Listing Views Favorites Messages Offers Status Rating Sold
{{ row.title }} {{ "{:,}".format(row.views) }} {{ "{:,}".format(row.favorites) }} {{ "{:,}".format(row.messages) }} {{ "{:,}".format(row.offers) }} {{ row.status|title }} {{ ('%.0f ★'|format(row.rating)) if row.rating else '—' }} {% if row.completed_sale %} {% else %}—{% endif %}
{% endif %}