Fixon
Fixon
  • 发布:2024-01-10 10:58
  • 更新:2024-01-16 11:04
  • 阅读:113

【uni统计2.0】页面没有显示统计数据

分类:uniCloud

uni-stat-receiver、uni-stat-cron运行日志正常。但是页面统计的数据还是全部都是0。

2024-01-10 10:58 负责人:无 分享
已邀请:
DCloud_云服务_JRP

DCloud_云服务_JRP

看下uni-stat-page-logs表中有数据吗?

  • Fixon (作者)

    有的 1000 多条

    2024-01-10 11:09

Fixon

Fixon (作者)

uni-config-center的json配置是默认的没有动过。

{  
    "debug": false,  
    "redis": false,  
    "cachetime": 604800,  
    "sessionExpireTime": 1800,  
    "realtimeStat": true,  
    "cronMin": false,  
    "cronMinTips": "如果设置cronMin: true(开启分钟级统计)则你必须再修改 cloudfunctions/uni-stat-cron/package.json 文件内的 triggers 属性的 config的值为 0 */10 * * * * * 代表每10分钟运行一次定时任务",  
    "cron": [  
        {  
            "type": "stat",  
            "time": "* * * 0"  
        },  
        {  
            "type": "stat",  
            "time": "* * 1 10"  
        },  
        {  
            "type": "stat",  
            "time": "1 * 1 20"  
        },  
        {  
            "type": "stat",  
            "time": "* 1 3 30"  
        },  
        {  
            "type": "active-device",  
            "time": "* * 0 10"  
        },  
        {  
            "type": "active-user",  
            "time": "* * 0 20"  
        },  
        {  
            "type": "page",  
            "time": "* * 3 20"  
        },  
        {  
            "type": "event",  
            "time": "* * 4 20"  
        },  
        {  
            "type": "error",  
            "time": "* * 5 20"  
        },  
        {  
            "type": "loyalty",  
            "time": "* * 6 20"  
        },  
        {  
            "type": "clean",  
            "time": "* * 5 30"  
        },  
        {  
            "type": "retention-device",  
            "time": "* * 2 20"  
        },  
        {  
            "type": "retention-device",  
            "time": "* 1 4 30"  
        },  
        {  
            "type": "retention-device",  
            "time": "1 * 2 30"  
        },  
        {  
            "type": "retention-user",  
            "time": "* * 3 40"  
        },  
        {  
            "type": "retention-user",  
            "time": "* 1 5 40"  
        },  
        {  
            "type": "retention-user",  
            "time": "1 * 6 30"  
        },  
        {  
            "type": "pay-result",  
            "time": "* * * 10",  
            "dimension": "hour",  
            "description": "每小时执行统计(会自动统计小时、天、周、月、季度、年度)",  
            "timely": true  
        }  
    ],  
    "batchInsertNum": 5000,  
    "errorCheck": {  
        "needCheck": true,  
        "checkTime": 5  
    },  
    "cleanLog": {  
        "open": true,  
        "reserveDays": {  
            "sessionLog": 31,  
            "userSessionLog": 31,  
            "pageLog": 7,  
            "eventLog": 7,  
            "shareLog": 7,  
            "errorLog": 7  
        }  
    }  
}  
Fixon

Fixon (作者)

这个是页面展现和云数据库的内容

Fixon

Fixon (作者)

uni.stat.cron的运行日志好像只输出了支付的统计,其他的统计好像没运行

Fixon

Fixon (作者)

OKK解决啦 谢谢 @DCloud_云服务_JRP

  • gmee

    你好,我的uni统计 页面统计没有数据,我看定时器日志是执行输出page--hour run 后面就没了,请问是什么原因。数据库page-logs是有数据的。

    2024-04-11 15:44

  • Fixon (作者)

    回复 gmee: 本地执行一下云函数试试

    2024-04-12 18:31

要回复问题请先登录注册