Browse Source

analytics

windhamdavid 3 years ago
parent
commit
272ae2d94d
2 changed files with 10 additions and 31 deletions
  1. 3 3
      inc/analytics.php
  2. 7 28
      page-analytics.php

+ 3 - 3
inc/analytics.php

@@ -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=20";
+	$url .= "&format=JSON&filter_limit=34";
 	$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
 
 	$fetched = file_get_contents($url);
@@ -20,7 +20,7 @@ function dw_wik_places() {
 	  $hits = $row['nb_visits'];
 		$logo = $row['logo'];
 		$length = $row['sum_visit_length'];
-	  print("<li class='list-group-item'><img src='https://davidawindham.com/wik/$logo' style='width:30px;'/> &nbsp; $location  <span class='badge'> $hits </span></li>");
+	  print("<li class='list-group-item'><img src='https://davidawindham.com/wik/$logo' style='width:20px;'/> &nbsp; $location  <span class='badge'> $hits </span></li>");
 	}
 }
 
@@ -30,7 +30,7 @@ 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=20";
+	$url .= "&format=JSON&filter_limit=43";
 	$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
 
 	$fetched = file_get_contents($url);

+ 7 - 28
page-analytics.php

@@ -1,13 +1,14 @@
 <?php get_header(); ?>
-	<div class="container-full" style="margin:80px 0 -100px">
-		<iframe id="map" width="100%" height="600px" scrolling="yes" frameborder="0"  style="background:#fff" src="https://davidawindham.com/wik/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=UserCountryMap&actionToWidgetize=realtimeMap&idSite=1&period=day&date=today&disableLink=1&widget=1&token_auth=3910b0da85f448ae35d4b75b4e6912bb"></iframe>
-	</div>
-	<div class="container" role="main">
+
+  <div class="container" role="main">
+    <div style="margin:80px 0 -110px;">
+      <iframe id="map" width="100%" height="600px" scrolling="yes" frameborder="0"  src="https://davidawindham.com/wik/index.php?module=Widgetize&action=iframe&disableLink=0&widget=1&moduleToWidgetize=UserCountryMap&actionToWidgetize=visitorMap&idSite=1&period=range&date=last30&disableLink=1&widget=1&token_auth=6785f36a6cacb01306dbd8d58a4207aa"></iframe>
+    </div>
 		<article  id="content" class="single" >
 			<div class="row">
 				<div class="col-sm-12">
-					<h4>Analytics</h4>
-					<p>I just put this page together as a simple way to monitor and share traffic on this website using <a href="http://piwik.org/">Piwik</a>. Above is a real time map of geo-located web traffic including the last 24 hours and below are some other statistics from the last month.</p>
+					<h1 style="font-size:28px;font-family:CM Sans;">Analytics</h1>
+					<p>I just put this page together as a simple way to monitor and share traffic on this website. These are lists of the content and visitors from the last month.</p>
 					</div>
 			</div>
 			<div class="row">
@@ -22,28 +23,6 @@
 					<?php echo dw_wik_url()?>
 				</div>
 			</div>
-			<div class="row">
-				<p>&nbsp;</p>
-			</div>
-			<div class="row">
-				<div class="col-sm-6">
-					<h4>Operating System</h4>
-					<ul class="list-group">
-						<?php echo dw_wik_users()?>
-					</ul>
-				</div>
-				<div class="col-sm-6">
-					<h4>Referrals</h4>
-					<ul class="list-group">
-						<?php echo dw_wik_keys()?>
-					</ul>
-					<h4>Referral Sources</h4>
-					<ul class="list-group">
-						<?php echo dw_wik_refs()?>
-					</ul>
-				</div>
-			</div>
-
 		</article>
 	</div>