埋点工具可能失效了

[复制链接]
48 |2
玩具店老板 发表于 昨天 20:20 | 显示全部楼层 |阅读模式
问题描述及使用流程:
https://forum.ark.online/forum.p ... =%E8%B0%B7%E6%AD%8C
这个帖子里介绍的埋点工具可能失效了
我去年年底调试过一次,当时在谷歌数据统计后台,看到了,是有数据的。
现在我想用这个谷歌统计放到游戏中观察数据,但谷歌后台无数据提示。



// ****发送的埋点事件  
            **.add**Listener(EASY_**YTICS_TRACKING, (userId: string) => {  
               
                //let **Data = {};
                //**Data[`点位${this.PointId}`] = userId;
                try {  
                    //**yticsServ**.google**Tracking(this.PointType, **Data);
                     **yticsServ**  
                        .create(this.PointType)  
                        .put(`点位${this.PointId}`, userId)  
                        .send();  
                    console.info(`[EasySaveRecord]:埋点发送成功 - ${this.PointType}`);
                } catch (error) {  
                    console.error(`[EasySaveRecord]:埋点发送失败:`, error);  
                }
            });  


运行显示埋点发送成功
但谷歌后台无数据

我搞了一个网页去安装了谷歌提供的代码,刷新网页后,谷歌后台有数据了。
image.png

我怀疑是可能需要填入网址:
image.png


相关截图或视频:

补充信息(版本、日志等):
回复

使用道具 举报

玩具店老板楼主 发表于 昨天 20:28 | 显示全部楼层
let **Data = {};
                **Data[`点位${this.PointId}`] = userId;
                try {  
                    **yticsServ**.google**Tracking(this.PointType, **Data);
                    console.info(`[EasySaveRecord]:埋点发送成功 - ${this.PointType}`);  
                } catch (error) {  
                    console.error(`[EasySaveRecord]:埋点发送失败:`, error);  
                }
回复

使用道具 举报

玩具店老板楼主 发表于 昨天 20:29 | 显示全部楼层
            **.add**Listener(EASY_**YTICS_TRACKING, (userId: string) => {  
                let jsonString = `{\"点位${this.PointId}\":${userId}}`;  
                **yticsServ**.google**Tracking(this.PointType, JSON.parse(jsonString));  
                console.info(`[EasySaveRecord]:客户端执行埋点记录 - 玩家${userId}`);  
                console.info(`[EasySaveRecord]:脚本实例${this.recordPointId}注册埋点***`);
            });  
回复

使用道具 举报

热门版块
快速回复 返回顶部 返回列表