{% extends 'base.html' %} {% load djinsight_tags %} {% block title %}{{ article.title }} - djinsight Example{% endblock %} {% block content %}

{{ article.title }}

{{ article.content|linebreaks }}

📊 djinsight Analytics Demo

This section demonstrates different ways to display analytics using djinsight modular components.

Individual Statistics Components
{% total_views_stat obj=article %} {% unique_views_stat obj=article %} {% last_viewed_stat obj=article %} {% first_viewed_stat obj=article %}
Time-based Statistics
{% views_today_stat obj=article %} {% views_week_stat obj=article %} {% views_month_stat obj=article %}
Live Statistics Counter

Auto-refreshes every 30 seconds

{% live_stats_counter obj=article show_unique=True refresh_interval=30 %}
Complete Analytics Widget
{% page_analytics_widget obj=article period='week' %}
Custom Layout Example
Article Performance
{% total_views_stat obj=article %}
{% unique_views_stat obj=article %}
{% views_today_stat obj=article %}
📈 Quick Stats

This article has been:

{% total_views_stat obj=article %}
{% unique_views_stat obj=article %}
{% if article.first_viewed_at %}
{% first_viewed_stat obj=article %}
{% endif %} {% if article.last_viewed_at %}
{% last_viewed_stat obj=article %}
{% endif %}
🔧 Code Examples

Here are the template tags used on this page:

{% templatetag openblock %} total_views_stat obj=article {% templatetag closeblock %}
{% templatetag openblock %} unique_views_stat obj=article {% templatetag closeblock %}
{% templatetag openblock %} views_today_stat obj=article {% templatetag closeblock %}
{% templatetag openblock %} live_stats_counter obj=article {% templatetag closeblock %}
{% templatetag openblock %} page_analytics_widget obj=article {% templatetag closeblock %}

Format filter:
{% templatetag openvariable %} article.total_views|format_view_count {% templatetag closevariable %}

{% page_view_tracker obj=article debug=True %} {% endblock %} {% block extra_css %} {% endblock %}