我该怎么让我的网页上命中/计数器访问它使用Piwik Analytics(分析) [英] How can I show a Hit/Visits Counter on my page which uses Piwik for analytics

查看:134
本文介绍了我该怎么让我的网页上命中/计数器访问它使用Piwik Analytics(分析)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示在主页当天的访问。
该网页进行跟踪与Piwik。

如何使用API​​与PHP得到(唯一的)访问和命中为今天这样我就可以在页面上某处他们展示


解决方案

  $结果= file_get_contents(\"http://mysite.com/piwik/?module=API&method=VisitsSummary.getUniqueVisitors&idSite=1&period=day&date=today&format=php\");
回声反序列化($结果);

I want to show the Visits for the current day on a homepage. That page is tracked with Piwik.

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 Analytics(分析)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆