Skip to content

Commit

Permalink
registrar fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Laubot committed Nov 6, 2023
1 parent 1f116ab commit bf02982
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Binary file modified public/Build/public.data
Binary file not shown.
2 changes: 1 addition & 1 deletion public/Build/public.framework.js

Large diffs are not rendered by default.

Binary file modified public/Build/public.wasm
Binary file not shown.
9 changes: 7 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@
function registrar(eventName, eventParams) {
//analytics.logEvent(eventName);
//console.log('logEvent', eventName);
window.analytics.logEvent(eventName, JSON.parse(eventParams));//JSON.parse(eventParams) {coin: 1, speed: 2, time: 3}
console.log("registrar", eventName, eventParams);
let ep = JSON.parse(eventParams.replace(/([0-9]{1,})(,)([0-9]{1,})/g,"$1.$3"));
for(let key in ep) {
ep[key] = isNaN(Number(ep[key]))? ep[key]: Number(ep[key]);
}
ep.upid = getUid();
console.log("registrar", eventName, eventParams, ep);
window.analytics.logEvent(eventName, ep);//JSON.parse(eventParams) {coin: 1, speed: 2, time: 3}
}
</script>

Expand Down

0 comments on commit bf02982

Please sign in to comment.