{% comment %} === djinsight Template Tags Examples === This file shows examples of how to use the new modular djinsight template tags. Copy these examples to your own templates. {% endcomment %} {% load djinsight_tags %}

{{ object.title }}

{{ object.content }}

{% page_view_tracker %}

{{ product.name }}

${{ product.price }}

{% page_view_tracker obj=product debug=True %}

Page Statistics

{% 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=post %} {% views_week_stat obj=post %} {% views_month_stat obj=post %}
{% live_stats_counter obj=course show_unique=True refresh_interval=15 %}
{% page_stats_display obj=property show_unique=False refresh_interval=60 %}
{% page_analytics_widget obj=document period='month' %}

This {{ article.get_display_name }} has been viewed {{ article.total_views|format_view_count }} times by {{ article.unique_views|format_view_count }} unique visitors.

{% if article.total_views > 0 %} {% else %}

📝 New content - be the first to view!

{% page_view_tracker obj=article %}
{% endif %}
{% total_views_stat obj=video %} {% unique_views_stat obj=video %}
{% views_today_stat obj=video %} {% views_week_stat obj=video %}
{% first_viewed_stat obj=video %} {% last_viewed_stat obj=video %}
{% live_stats_counter obj=video refresh_interval=10 %}
Views: {{ article.total_views|format_view_count }} ({{ article.unique_views|format_view_count }} unique)
{% page_view_tracker obj=article async_load=False %}
{% if user.is_staff %}

🔧 Admin Analytics

{% total_views_stat obj=page %} {% unique_views_stat obj=page %} {% first_viewed_stat obj=page %} {% last_viewed_stat obj=page %} {% views_today_stat obj=page %} {% views_week_stat obj=page %} {% views_month_stat obj=page %}
{% live_stats_counter obj=page show_unique=True refresh_interval=5 %}
{% endif %}