Matomo API 官方接口详情

API接口

你可以通过调用Matomo的分析接口将数据集成到其他应用中去。这些数据包括访问数,页面网址、网页标题、用户设置、搜索引擎、关键词、推荐网站、用户浏览器

其中的请求参数和返回值需要对照官方手册来

未定义

## API `未定义`
## Annotations `未定义`
## Contents `未定义`
## CoreAdminHome `未定义`
## CustomDimensions `未定义`
## CustomJsTracker `未定义`
## CustomVariables `未定义`
## DBStats `未定义`
## Dashboard `未定义`
## Events `未定义`
## Feedback `未定义`
## Goals `未定义`
## ImageGraph `未定义`
## LanguagesManager `未定义`
## Login `未定义`
## Marketplace `未定义`
## MobileMessaging `未定义`
## PagePerformance `未定义`
## Provider `未定义`
## SEO `未定义`
## SitesManager `未定义`
## TagManager `未定义`
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22

Actions 动作(行为)

  • Actions.get 访客分析-概述-访客概览(右边一列)
  • Actions.getPageUrls 行为-页面
  • Actions.getPageUrlsFollowingSiteSearch
  • Actions.getPageTitlesFollowingSiteSearch
  • Actions.getEntryPageUrls 行为-进入页面
  • Actions.getExitPageUrls 行为-退出页面
  • Actions.getPageUrl 行为-通过页面的PageUrl查看详情(获取单条记录)
  • Actions.getPageTitles 行为-页面标题
  • Actions.getEntryPageTitles 行为-页面标题-进入页面标题
  • Actions.getExitPageTitles 行为-页面标题-退出页面标题
  • Actions.getDownloads 行为-下载
  • Actions.getOutlinks 行为-离站链接数量
  • Actions.getSiteSearchKeywords 行为-站内搜索-站内搜索关键词
  • Actions.getSiteSearchNoResultKeywords 行为-站内搜索-查无资料的关键词
  • Actions.getSiteSearchCategories 行为-站内搜索-搜索分类

VisitsSummary 访问量总结(访客分析-概述)

  • VisitsSummary.get 访客分析-概述-访客概览
  • VisitsSummary.getVisits 访客分析-概述-访客概览-访问次数
  • VisitsSummary.getUniqueVisitors 访客分析-概述-访客概览-独立访客次数
  • VisitsSummary.getUsers 访客分析-概述-用户
  • VisitsSummary.getActions 访客分析-概述-访客概览-页面访问次数
  • VisitsSummary.getMaxActions 访客分析-概述-访客概览-页面访问单次访问的最大活动量
  • VisitsSummary.getBounceCount 访客分析-概述-访客概览-跳出次数
  • VisitsSummary.getVisitsConverted 不知道什么用的
  • VisitsSummary.getSumVisitsLengthPretty 不知道是什么时间,精确到小时秒
  • VisitsSummary.getSumVisitsLength 不知道是什么时间,时间戳

VisitorInterest 访客忠诚度(行为-忠诚度)

  • VisitorInterest.getNumberOfVisitsPerVisitDuration 行为-忠诚度-基于停留时间段的访问次数
  • VisitorInterest.getNumberOfVisitsPerPage 行为-忠诚度-基于浏览页面数的访问次数
  • VisitorInterest.getNumberOfVisitsByDaysSinceLast 行为-忠诚度- 距离上次访问天数的访问量
  • VisitorInterest.getNumberOfVisitsByVisitCount 行为-忠诚度-基于访问次数的统计

UserCountry 用户地区(访客分析-所在地)

  • UserCountry.getCountry 访客分析-所在地-国家
  • UserCountry.getContinent 访客分析-所在地-大洲
  • UserCountry.getRegion 访客分析-所在地-地区
  • UserCountry.getCity 访客分析-所在地-城市
  • UserCountry.getCountryCodeMapping 所有地区代码对应地区
  • UserCountry.getLocationFromIP
  • UserCountry.getNumberOfDistinctCountries 访客分析-所在地-不同的国家/地区的数量

Live 访客日志

  • Live.getLastVisitsDetails 访客分析-访问日志(列表)
  • Live.getVisitorProfile 访客分析-访问日志-查看访客资料(通过访客id,查看详情)
  • Live.getMostRecentVisitorId 访客分析-查看访客id

VisitTime 访问时间

  • VisitTime.getByDayOfWeek 访客分析-访问时间-周报表
  • VisitTime.getVisitInformationPerLocalTime 访客分析-访问时间-日报表
  • VisitTime.getVisitInformationPerServerTime 访客分析-访问时间-依服务器时间记录的访问

Transitions 转场(转换)

Referrers 反向连接(获客分析)

  • Referrers.get 获客分析-概述-渠道类型
  • Referrers.getReferrerType 获客分析-所有渠道-渠道类型
  • Referrers.getAll 获客分析-所有渠道-来源分析
  • Referrers.getKeywords 获客分析-搜索引擎和关键词-关键词
  • Referrers.getSearchEngines 获客分析-搜索引擎和关键词-搜索引擎
  • Referrers.getSocials 获客分析-社交网络-社交网络
  • Referrers.getUrlsForSocial 获客分析-社交网络-社交网络(网站页面)
  • Referrers.getNumberOfDistinctSearchEngines 获客分析-概述-不同的搜索引擎
  • Referrers.getNumberOfDistinctSocialNetworks 获客分析-概述-不同的社交网络
  • Referrers.getNumberOfDistinctKeywords 获客分析-概述-不同的关键词
  • Referrers.getNumberOfDistinctCampaigns 获客分析-概述-不同的广告活动
  • Referrers.getNumberOfDistinctWebsites 获客分析-概述-不同的网站
  • Referrers.getNumberOfDistinctWebsitesUrls 获客分析-概述-不同的网页

DevicePlugins 浏览器插件

  • DevicePlugins.getPlugin 访客分析-软件-浏览器插件

DevicesDetection 设备软件

DevicesDetection API可以让您访问报告您的访客设备,品牌,型号,操作系统,浏览器。

  • DevicesDetection.getType 访客分析-设备-设备类型
  • DevicesDetection.getBrand 访客分析-设备-设备品牌
  • DevicesDetection.getModel 访客分析-设备-设备型号
  • DevicesDetection.getOsFamilies 访客分析-软件-操作系统家族
  • DevicesDetection.getOsVersions 访客分析-软件-操作系统版本
  • DevicesDetection.getBrowsers 访客分析-软件-浏览器
  • DevicesDetection.getBrowserVersions 访客分析-软件-浏览器版本
  • DevicesDetection.getBrowserEngines 访客分析-软件-浏览器引擎

Insights 小组件

  • DevicePlugins.getInsightsOverview 报表面板-报表面板-有影响力的人(只取一个)
  • DevicePlugins.getMoversAndShakersOverview 报表面板-报表面板-有影响力的人(获取所有)

MultiSites 所有网站

  • MultiSites.getAll 所有网站-所有网站报表
  • MultiSites.getOne 所有网站-所有网站报表(单条)

Resolution 分辨率

  • MultiSites.getResolution 访客分析-分辨率-画面分辨率
  • MultiSites.getConfiguration 访客分析-分辨率-客户端配置

VisitFrequency 访客频率

  • VisitFrequency.get 行为-忠诚度-频率概览

请求与返回参数的解释

词汇表 https://glossary.matomo.org/

js传值 url参数统计解释

1、idsite:网站ID
2、rec:1(写死)
3、r:随机码
4、h:当前小时
5、m:当前分钟
6、s:当前秒数
7、url:当前纯净地址,只留域名和协议
8、_id:UUID
9、_idts:访问的时间戳
10、_idvc:访问数
11、_idn:新访客(目前尚未使用)
12、_refts:访问来源的时间戳
13、_viewts:上一次访问的时间戳
14、cs:当前页面的字符编码
15、send_image:是否用图像请求方式传输数据
16、gt_ms:内容加载消耗的时间(响应结束时间减去请求开始时间)
17、pv_id:唯一性标识

  再列出第二部分,用于统计浏览器的功能,通过Navigator对象的属性(mimeTypes、javaEnabled等)和Screen对象的属性(width与height)获得。

1、pdf:是否支持pdf文件类型
2、qt:是否支持QuickTime Player播放器
3、realp:是否支持RealPlayer播放器
4、wma:是否支持MPlayer播放器
5、dir:是否支持Macromedia Director
6、fla:是否支持Adobe FlashPlayer
7、java:是否激活了Java
8、gears:是否安装了Google Gears
9、ag:是否安装了Microsoft Silverlight
10、cookie:是否启用了Cookie
11、res:屏幕的宽和高(未正确计算高清显示器)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

API 请求参考

    标准必填API参数
    
idSite:         站点ID
period:         您请求统计信息的时间段
date:           请求的日期
segment:        定义您希望将报告过滤到的自定义细分(相当于多的条件)
format:         定义输出的格式
filter_limit:   定义要返回的行数

    可选的API参数
    
language:       如果指定,则返回可以国际化并将转换的数据字符串。
idSubtable:     用于请求给定行的子表。
expanded:       一些API函数的参数为​​“扩展”。
flat:           一些API函数的参数为​​“扩展”,
label:          此参数只能用于搜索与给定标签匹配的行。
pivotBy:
pivotByColumn:
filter_offset:
filter_truncate:
filter_pattern:
filter_column:
filter_sort_order:              定义结果的顺序,升序或降序
filter_sort_column:
filter_excludelowpop:
filter_excludelowpop_value:
hideColumns:
showColumns:
convertToUnicode:
filter_column_recursive:
filter_pattern_recursive:
disable_generic_filters:
disable_queued_filters:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33

API 返回结果参考

以下是API返回的指标及其定义的列表。

一般指标
    nb_uniq_visitors -不重复访客人数
    nb_visits -访问次数(闲置30分钟被视为新访问)
    nb_users-唯一的活动用户数(具有已知User ID的访问者)。如果您不使用用户ID,则该指标将设置为零。
    nb_actions -操作次数(页面浏览量,链接和下载量)
    sum_visit_length -花费的总时间(以秒为单位)
    bounce_count -跳出的访问次数(仅查看一页)
    max_actions -访问中的最大操作数
    nb_visits_converted -转化为目标的访问次数
    nb_conversions -目标转化次数
    revenue -目标转化的总收入
特定于页面URL和页面标题报告的指标
    nb_hits -此页面上的观看次数
    entry_nb_visits -从此页面开始的访问次数
    entry_nb_uniq_visitors -在此页面上开始访问的唯一身份访问者数量
    entry_nb_actions -从此页面开始的访问的页面浏览量
    entry_sum_visit_length -从此页面开始的访问所花费的时间(以秒为单位)
    entry_bounce_count -从此页面开始并被跳出的访问次数(仅查看一页)
    exit_nb_visits -在此页面上完成的访问次数
    exit_nb_uniq_visitors -在此页面上结束访问的唯一身份访问者数量
    sum_time_spent -在此页面上花费的总时间(以秒为单位)
    sum_daily_nb_uniq_visitors-在此期间的几天中,每日唯一身份访问者的总和。Matomo不会在整个期间内处理唯一身份访问者。
    sum_daily_entry_nb_uniq_visitors -在此页面上开始访问的每日唯一身份访问者总数
    sum_daily_exit_nb_uniq_visitors -(已弃用)与 sum_daily_entry_nb_uniq_visitors
    exit_bounce_count -(已弃用)与 entry_bounce_count
处理的指标,显示在Metadata API响应中
    avg_time_on_page -在此页面上花费的平均时间(以秒为单位)
    bounce_rate -登陆此页面后离开网站的访问比例
    exit_rate -在此页面之后未查看任何其他页面的访问比例
电子商务指标,仅出现在Ecommerce Goals.getItems * API调用中
    revenue-产品销售产生的总收入。不包括税,运费和折扣。
    quantity -数量是每个产品SKU /名称/类别所售产品的总数。
    orders -这是至少包含此产品SKU /名称/类别的电子商务订单的总数。
    abandoned_carts-仅在请求包含“&abandonedCarts = 1”时设置此值。在这种情况下,“订单”指标将不会返回。它是至少包含一次此商品SKU /名称/类别的废弃小车总数。
    avg_price -此产品/类别的平均收入。
    avg_quantity -此产品/类别的平均数量。
    nb_visits-仅当您设置了“电子商务产品/类别页面跟踪”时,此值才会显示。“产品/类别”页面上的访问次数。
    conversion_rate-仅当您设置了“电子商务产品/类别页面跟踪”时,此值才会显示。转化率是包含该产品/类别的订单数量(如果请求中包含“&abandonedCarts = 1”,则为多少),除以产品/类别页面上的访问次数。
事件跟踪指标,显示在Events API调用中
    nb_events -活动数量
    nb_events_with_value -设置了值的事件数
    sum_event_value -事件值之和
    min_event_value -最小事件值
    max_event_value -最大事件价值
    avg_event_value -事件值的平均值
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
来源:https://blog.csdn.net/qq_33858250/article/details/111769147

评论

此博客中的热门博文

Tailscale 开源版中文部署指南(支持无限设备数、自定义多网段 、自建中继等高级特性)

iOS任意版本号APP下载(含itunes 12.6.5.3 最后带AppStore版本)

关于 N1 旁路由的设置

Mifare Classic card(M1卡)破解过程记录(准备+理论+获取扇区密钥+数据分析)

Blogger搭建国内可正常访问博客(超详细教程)

一些免费的云资源

打造一个可国内访问的Blogger(Blogspot)方法

百度站长平台中接入Blogger博客

Mifare Classic card(M1)卡破解过程

重新学习并解锁emby4.6.7,4.7.2版本