diff --git a/_data/metrics.js b/_data/metrics.js index 2c144f86..a5bea829 100644 --- a/_data/metrics.js +++ b/_data/metrics.js @@ -24,6 +24,18 @@ const REPORTS = { url: "global__device_category__last30.[end_date].csv", columnKeys: ["deviceCategory", "activeUsers", "percentage"] }, + MOST_DOWNLOADED_DATASETS: { + title: "Most Downloaded Dataset Files", + description: "Top 10 downloaded files", + url: "global__download_requests__last30.[end_date].csv", + columnKeys: ["linkUrl", "eventCount"] + }, + MOST_CLICKED_OUTBOUND_LINKS: { + title: "Most Clicked Outbound Links", + description: "Top 10 external link clicks", + url: "global__link_requests__last30.[end_date].csv", + columnKeys: ["linkUrl", "eventCount"] + }, DATASETS_PER_ORG: { title: "Number of Datasets per Organization", description: "Count of datasets by organization", @@ -36,6 +48,7 @@ const REPORTS = { url: "global__harvest_sources.[end_date].csv", columnKeys: ["organization", "count"] } + }, // ORG is a meta constructor for orgs ORG: { diff --git a/pages/metrics/metrics.html b/pages/metrics/metrics.html index 467ff7e2..9a288428 100644 --- a/pages/metrics/metrics.html +++ b/pages/metrics/metrics.html @@ -84,17 +84,19 @@

{{block.meta.title}}

{% for row in block.data offset:1 %} {% for column in row %} - {%- if block.meta.columnKeys contains block.data[0][forloop.index0] -%} - {%- if forloop.first -%} - {%- if cacheKey == "DATASETS_PER_ORG" or cacheKey == "HARVEST_SOURCES_PER_ORG" -%} - {{metrics.orgDict[column]}} - {%- else -%} - {{column}} + {%- if block.meta.columnKeys contains block.data[0][forloop.index0] -%} + {%- if forloop.first -%} + {%- if cacheKey == "DATASETS_PER_ORG" or cacheKey == "HARVEST_SOURCES_PER_ORG" -%} + {{metrics.orgDict[column]}} + {%- elsif cacheKey == "MOST_DOWNLOADED_DATASETS" or cacheKey == "MOST_CLICKED_OUTBOUND_LINKS" -%} + {{column}} + {%- else -%} + {{column}} + {%- endif -%} + {%- else -%} + {{column | toLocaleString}} + {%- endif -%} {%- endif -%} - {%- else -%} - {{column | toLocaleString}} - {%- endif -%} - {%- endif -%} {% endfor %} {% endfor %}