Skip to content

Commit

Permalink
add corresponding dataset page to download file and outbound click ta…
Browse files Browse the repository at this point in the history
…bles
  • Loading branch information
rshewitt committed Dec 6, 2024
1 parent c697016 commit 0ed0a5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _data/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ const REPORTS = {
title: "Most Downloaded Dataset Files",
description: "Top 10 downloaded files from dataset pages",
url: "download_requests__last30.[end_date].csv",
columnKeys: ["linkUrl", "eventCount"]
columnKeys: ["linkUrl", "pageTitle", "eventCount"]
},
MOST_CLICKED_OUTBOUND_LINKS: {
title: "Most Clicked Outbound Links",
description: "Top 10 external link clicks from dataset pages",
url: "link_requests__last30.[end_date].csv",
columnKeys: ["linkUrl", "eventCount"]
columnKeys: ["linkUrl", "pageTitle", "eventCount"]
}
}
}
Expand All @@ -64,6 +64,7 @@ const ENUMS = {
"deviceCategory": "Device Category",
"activeUsers": "Users",
"searchTerm": "Search Term",
"pageTitle": "Title",
"eventCount": "Count",
"organization": "Organization",
"count": "Count",
Expand Down
7 changes: 7 additions & 0 deletions pages/metrics/metrics_per-org.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,17 @@ <h4>{{block.meta.title}}</h4>
<td><a href="{{column}}">{{column}}</a></td>
{%- endif -%}

{%- else -%}
{%- assign pageURL = 5 -%}
{%- if block.data[0][forloop.index0] == "pageTitle" -%}
<td align="right">
<a href="{{row[pageURL]}}" target="_blank">{{column | toLocaleString | replace: " - Catalog", ""}}</a>
</td>
{%- else -%}
<td align="right">{{column | toLocaleString}}</td>
{%- endif -%}
{%- endif -%}
{%- endif -%}
{% endfor %}
</tr>
{% endfor %}
Expand Down

0 comments on commit 0ed0a5e

Please sign in to comment.