本文介绍了如何在使用 Piwik 进行分析的页面上显示点击次数/访问次数计数器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在主页上显示当天的访问次数.该页面使用 Piwik 进行跟踪.
I want to show the Visits for the current day on a homepage.That page is tracked with Piwik.
如何在 PHP 中使用 API 来获取今天的(唯一的)访问量和点击量,以便我可以在页面上的某处显示它们
How to use the API with PHP to get the (unique) visits and hits for today so that I can show them somewhere on the page
推荐答案
$result = file_get_contents("http://mysite.com/piwik/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=1&period=day&date=today&format=php");
echo unserialize($result);
这篇关于如何在使用 Piwik 进行分析的页面上显示点击次数/访问次数计数器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!