|
|
@@ -5,7 +5,7 @@ function dw_wik_places() {
|
|
|
$url = "https://davidawindham.com/wik/";
|
|
|
$url .= "?module=API&method=UserCountry.getCity";
|
|
|
$url .= "&idSite=1&period=month&date=yesterday";
|
|
|
- $url .= "&format=JSON&filter_limit=34";
|
|
|
+ $url .= "&format=JSON&filter_limit=50";
|
|
|
$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
|
|
|
|
|
|
$fetched = file_get_contents($url);
|
|
|
@@ -30,7 +30,9 @@ function dw_wik_url() {
|
|
|
$url = "https://davidawindham.com/wik/";
|
|
|
$url .= "?module=API&method=Actions.getPageUrls";
|
|
|
$url .= "&idSite=1&period=month&date=yesterday";
|
|
|
- $url .= "&format=JSON&filter_limit=43";
|
|
|
+ // flat=1 expands the hierarchical folder report into individual page URLs, so the
|
|
|
+ // /til subpages (tracked via docusaurus-plugin-matomo) show instead of one "til" folder.
|
|
|
+ $url .= "&format=JSON&filter_limit=50&flat=1";
|
|
|
$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
|
|
|
|
|
|
$fetched = file_get_contents($url);
|
|
|
@@ -41,11 +43,12 @@ function dw_wik_url() {
|
|
|
}
|
|
|
|
|
|
foreach ($content as $row) {
|
|
|
- $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
|
|
|
$label = $row['label'];
|
|
|
$hits = $row['nb_hits'];
|
|
|
- $time = $row['avg_time_on_page'];
|
|
|
- print("<li class='list-group-item'> <a href='https://davidawindham.com/$label'>$label</a> <span class='badge'> $hits </span></li>");
|
|
|
+ $path = '/' . ltrim( html_entity_decode( urldecode( $label ), ENT_QUOTES ), '/' ); // flat labels start with "/"
|
|
|
+ $disp = htmlspecialchars( $path, ENT_QUOTES );
|
|
|
+ $text = ( '/' === $path ) ? '/index' : $disp; // bare "/" is too small to click
|
|
|
+ print("<li class='list-group-item'> <a href='https://davidwindham.com$disp'>$text</a> <span class='badge'> $hits </span></li>");
|
|
|
}
|
|
|
|
|
|
}
|