{% extends 'base.html' %} {% set CDN_URL = 'https://cdn.theorchard.io/' %} {% set IMAGES_URL = CDN_URL+'images' %} {% block header_title %}
{{ account_name }}
{% trans %}Weekly Analytics{% endtrans %} {{ start_date|datetimeformat(date_format='%b %d') }} - {{ end_date|datetimeformat(date_format='%b %d') }} {{ account_name }} {% endblock %} {% block content %} {# Top New Releases #} {% if top_new_releases and top_new_releases[0] %}

{% trans %}Top New Releases{% endtrans %}

{% trans %}Review the performance of your latest releases, ranked by streams.{% endtrans %}
{% for item in stores %} {% endfor %} {% for item in top_new_releases %} {% if item.release_name|length > 14 %} {% set white_space = "normal" %} {% else %} {% set white_space = "nowrap" %} {% endif %} {% if (loop.index0 + 1) % 2 > 0 %} {% set table_row_color = '#ffffff' %} {% else %} {% set table_row_color = '#f2f2f2' %} {% endif %} {% if item.subaccount_name is defined %} {% set row_height = "55px" %} {% else %} {% set row_height = "45px" %} {% endif %} {% for store in stores %} {% endfor %} {% endfor %}
{% trans %}TITLE{% endtrans %} {% trans %}LAST WK{% endtrans %} {{ item }}
{{ (loop.index0 + 1) }}
{{item.release_name}} {% if item.release_format %} {{ item.release_format|upper|replace_format() }} {% endif %}
{{item.artist_name}}
{% if item.subaccount_name %}
{{ item.subaccount_name }} {% endif %}
{{item.total_streams | format_number() }} {% if item.store_percentages[store] is defined and item.store_percentages[store] is not none and item.store_percentages[store] != 'N/A' %} {% if item.store_percentages[store].get('streams_per_store') is defined and item.store_percentages[store].get('streams_per_store') is not none and item.store_percentages[store].get('streams_per_store') != 'N/A' %}
{{ item.store_percentages[store].get('streams_per_store', '-') | format_number() }}
{% else %}
-
{% endif %} {% else %}
-
{% endif %}
{% endif %} {# Top Tracks #} {% if top_tracks and top_tracks[0] %}

{% trans %}Top Tracks{% endtrans %}

{% trans %}See the tracks that earned the most streams between{% endtrans %}  {{ start_date|datetimeformat(date_format='%b %d') }}  {% trans %}-{% endtrans %}  {{ end_date|datetimeformat(date_format='%b %d') }}.
{% for item in stores %} {% endfor %} {% for item in top_tracks %} {% if item.track_name|length > 14 %} {% set white_space = "normal" %} {% else %} {% set white_space = "nowrap" %} {% endif %} {% if (loop.index0 + 1) % 2 > 0 %} {% set table_row_color = '#ffffff' %} {% else %} {% set table_row_color = '#f2f2f2' %} {% endif %} {% if item.subaccount_name is defined %} {% set row_height = "55px" %} {% else %} {% set row_height = "45px" %} {% endif %} {% for store in stores %} {% endfor %} {% endfor %}
{% trans %}TITLE{% endtrans %} {% trans %}LAST WK{% endtrans %} {{ item }}
{{ (loop.index0 + 1) }}
{% set isrc = item.isrc %} {{item.track_name}}
{{item.artist_names | format_artist_names() }}
{% if item.subaccount_name %}
{{ item.subaccount_name }} {% endif %}
{% if item.growth_percentage is defined and item.growth_percentage is not none %} {% if item.growth_percentage < -0.5 %} {% set growth_color = '#d54236' %} {% elif item.growth_percentage > 0.5 %} {% set growth_color = '#06a459' %} {% else %} {% set growth_color = '#A8A0A0' %} {% endif %}
{{item.total_streams | format_number() }}
{{ item.growth_percentage | format_growth_percentage }}
{% else %}
{{item.total_streams | format_number() }}
{% endif %}
{% if item.store_percentages[store] is defined and item.store_percentages[store] is not none and item.store_percentages[store] != 'N/A' %}
{{ item.store_percentages[store].get('streams_per_store', '-') | format_number() }}
{% if item.store_percentages[store].get('growth_percentage_per_store') is defined and item.store_percentages[store].get('growth_percentage_per_store') is not none %} {% if item.store_percentages[store].get('growth_percentage_per_store') < -0.5 %} {% set growth_color = '#d54236' %} {% elif item.store_percentages[store].get('growth_percentage_per_store') > 0.5 %} {% set growth_color = '#06a459' %} {% else %} {% set growth_color = '#A8A0A0' %} {% endif %}
{{ item.store_percentages[store].get('growth_percentage_per_store') | format_growth_percentage }}
{% else %}
-
{% endif %} {% else %}
-
{% endif %}
{% endif %} {# Top Releases #} {% if top_releases and top_releases[0] %}

{% trans %}Top Releases{% endtrans %}

{% trans %}See the releases that earned the most streams between{% endtrans %}  {{ start_date|datetimeformat(date_format='%b %d') }}  {% trans %}-{% endtrans %}  {{ end_date|datetimeformat(date_format='%b %d') }}.
{% for item in stores %} {% endfor %} {% for item in top_releases %} {% if item.release_name|length > 14 %} {% set white_space = "normal" %} {% else %} {% set white_space = "nowrap" %} {% endif %} {% if (loop.index0 + 1) % 2 > 0 %} {% set table_row_color = '#ffffff' %} {% else %} {% set table_row_color = '#f2f2f2' %} {% endif %} {% if item.subaccount_name is defined %} {% set row_height = "55px" %} {% else %} {% set row_height = "45px" %} {% endif %} {% for store in stores %} {% endfor %} {% endfor %}
{% trans %}TITLE{% endtrans %} {% trans %}LAST WK{% endtrans %} {{ item }}
{{ (loop.index0 + 1) }}
{{item.release_name}} {% if item.release_format %} {{ item.release_format|upper|replace_format() }} {% endif %}
{{item.artist_name}}
{% if item.subaccount_name %}
{{ item.subaccount_name }} {% endif %}
{% if item.growth_percentage is defined and item.growth_percentage is not none %} {% if item.growth_percentage < -0.5 %} {% set growth_color = '#d54236' %} {% elif item.growth_percentage > 0.5 %} {% set growth_color = '#06a459' %} {% else %} {% set growth_color = '#A8A0A0' %} {% endif %}
{{item.total_streams | format_number() }}
{{ item.growth_percentage | format_growth_percentage }}
{% else %}
{{item.total_streams | format_number() }}
{% endif %}
{% if item.store_percentages[store] is defined and item.store_percentages[store] is not none and item.store_percentages[store] != 'N/A' %}
{{ item.store_percentages[store].get('streams_per_store', '-') | format_number() }}
{% if item.store_percentages[store].get('growth_percentage_per_store') is defined and item.store_percentages[store].get('growth_percentage_per_store') is not none %} {% if item.store_percentages[store].get('growth_percentage_per_store') < -0.5 %} {% set growth_color = '#d54236' %} {% elif item.store_percentages[store].get('growth_percentage_per_store') > 0.5 %} {% set growth_color = '#06a459' %} {% else %} {% set growth_color = '#A8A0A0' %} {% endif %}
{{ item.store_percentages[store].get('growth_percentage_per_store') | format_growth_percentage }}
{% else %}
-
{% endif %} {% else %}
-
{% endif %}
{% endif %} {# Top Physical Shipments #} {% if top_physical_shipments and top_physical_shipments[0] %}

{% trans %}Top Physical Shipments{% endtrans %}

{% trans %}Products listed below represent those with the most shipments across the US and Canada between{% endtrans %}  {{ start_date|datetimeformat(date_format='%b %d') }}  {% trans %}-{% endtrans %}  {{ end_date|datetimeformat(date_format='%b %d') }}.
{% for item in top_physical_shipments %} {% if item.product_name|length > 14 %} {% set white_space = "normal" %} {% else %} {% set white_space = "nowrap" %} {% endif %} {% if (loop.index0 + 1) % 2 > 0 %} {% set table_row_color = '#ffffff' %} {% else %} {% set table_row_color = '#f2f2f2' %} {% endif %} {% if item.subaccount_name is defined %} {% set row_height = "55px" %} {% else %} {% set row_height = "45px" %} {% endif %} {% endfor %}
{% trans %}TITLE{% endtrans %} {% trans %}LAST WEEK{% endtrans %}
{{ (loop.index0 + 1) }}
{{item.product_name}} {% if item.product_type %} {{ item.product_type|upper|replace_format() }} {% endif %}
{{item.artist_name}}
{% if item.subaccount_name %}
{{ item.subaccount_name }} {% endif %}
{{item.total_transactions | format_number() }}
{% endif %} {% if notes %} {% endif %}
{% endblock %}