google、观测云埋点
This commit is contained in:
parent
80fb1e1a20
commit
c34d8d6da9
@ -17,6 +17,8 @@ VUE_APP_CHAIN_ID = '5611'
|
|||||||
|
|
||||||
VUE_APP_APP_NAME = 'CF UAW'
|
VUE_APP_APP_NAME = 'CF UAW'
|
||||||
|
|
||||||
|
VUE_APP_MODE = 'development'
|
||||||
|
|
||||||
# 铭文的验证地址
|
# 铭文的验证地址
|
||||||
VUE_APP_SCRIPTION_ADDRESS='0xcd4bb3402f1a444a1af10f31946ed37dac0eac4d'
|
VUE_APP_SCRIPTION_ADDRESS='0xcd4bb3402f1a444a1af10f31946ed37dac0eac4d'
|
||||||
# VUE_APP_SCRIPTION_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
# VUE_APP_SCRIPTION_ADDRESS='0x50A8e60041A206AcaA5F844a1104896224be6F39'
|
||||||
|
@ -15,5 +15,7 @@ VUE_APP_CHAIN_ID = '204'
|
|||||||
|
|
||||||
VUE_APP_APP_NAME = 'CF UAW'
|
VUE_APP_APP_NAME = 'CF UAW'
|
||||||
|
|
||||||
|
VUE_APP_MODE = 'production'
|
||||||
|
|
||||||
VUE_APP_SCRIPTION_ADDRESS='0xcd4bb3402f1a444a1af10f31946ed37dac0eac4d'
|
VUE_APP_SCRIPTION_ADDRESS='0xcd4bb3402f1a444a1af10f31946ed37dac0eac4d'
|
||||||
VUE_APP_CONTRACT='0x03B6f01EB419915B1F157e67C8263101ddd6E15e'
|
VUE_APP_CONTRACT='0x03B6f01EB419915B1F157e67C8263101ddd6E15e'
|
23
package-lock.json
generated
23
package-lock.json
generated
@ -8,6 +8,7 @@
|
|||||||
"name": "uawgame",
|
"name": "uawgame",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@cloudcare/browser-rum": "^3.1.11",
|
||||||
"@walletconnect/ethereum-provider": "^2.11.2",
|
"@walletconnect/ethereum-provider": "^2.11.2",
|
||||||
"@walletconnect/modal": "^2.6.2",
|
"@walletconnect/modal": "^2.6.2",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
@ -1851,6 +1852,28 @@
|
|||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@cloudcare/browser-core": {
|
||||||
|
"version": "3.1.11",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@cloudcare/browser-core/-/browser-core-3.1.11.tgz",
|
||||||
|
"integrity": "sha512-GX5UIyvznSIO11N2DCaHL7NcniogMYAo7f7AQKDIgGKpFM9s6QspwY43XituUC8veSBvlSiPdE72MTCJF9ACxA=="
|
||||||
|
},
|
||||||
|
"node_modules/@cloudcare/browser-rum": {
|
||||||
|
"version": "3.1.11",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@cloudcare/browser-rum/-/browser-rum-3.1.11.tgz",
|
||||||
|
"integrity": "sha512-zVNV0TxpIhiC18ge3Gjqiuep5Z3VB8uJdFDtSSoKac/2nFUnILQGE7MMunIbA4yATOy2UzDqDIbcHH3a2DK1Kw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@cloudcare/browser-core": "3.1.11",
|
||||||
|
"@cloudcare/browser-worker": "3.1.11"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cloudcare/browser-worker": {
|
||||||
|
"version": "3.1.11",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@cloudcare/browser-worker/-/browser-worker-3.1.11.tgz",
|
||||||
|
"integrity": "sha512-Rs1Nvb/38DmSX12TRHTgr6GjeUEWwkNrJLFPSohiOjEZVhq5gVVk/r3vutRs3hCaKW1Fh++ouMECzh1vp2rywA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@cloudcare/browser-core": "3.1.11"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@discoveryjs/json-ext": {
|
"node_modules/@discoveryjs/json-ext": {
|
||||||
"version": "0.5.7",
|
"version": "0.5.7",
|
||||||
"resolved": "https://registry.npmmirror.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
"resolved": "https://registry.npmmirror.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@cloudcare/browser-rum": "^3.1.11",
|
||||||
"@walletconnect/ethereum-provider": "^2.11.2",
|
"@walletconnect/ethereum-provider": "^2.11.2",
|
||||||
"@walletconnect/modal": "^2.6.2",
|
"@walletconnect/modal": "^2.6.2",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
@ -22,10 +23,10 @@
|
|||||||
"postcss-px-to-viewport": "^1.1.1",
|
"postcss-px-to-viewport": "^1.1.1",
|
||||||
"swiper": "^5.4.5",
|
"swiper": "^5.4.5",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
|
"vue-gtag": "^1.16.1",
|
||||||
"vue-loader": "^15.10.1",
|
"vue-loader": "^15.10.1",
|
||||||
"vue-router": "^3.5.1",
|
"vue-router": "^3.5.1",
|
||||||
"vuex": "^3.6.2",
|
"vuex": "^3.6.2",
|
||||||
"vue-gtag": "^1.16.1",
|
|
||||||
"web3": "^4.5.0"
|
"web3": "^4.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
BIN
src/assets/username/Counter Fire.jpg
Normal file
BIN
src/assets/username/Counter Fire.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 229 KiB |
BIN
src/assets/username/Gaming Chronicles.jpg
Normal file
BIN
src/assets/username/Gaming Chronicles.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { apiCheckActivity } from "@/utils/webapi.js";
|
import { apiCheckActivity } from "@/utils/webapi.js";
|
||||||
|
import { datafluxRum } from '@cloudcare/browser-rum'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
title: String,
|
title: String,
|
||||||
@ -27,6 +28,9 @@ export default {
|
|||||||
let { errcode, errmsg, data } = await apiCheckActivity(
|
let { errcode, errmsg, data } = await apiCheckActivity(
|
||||||
this.itemData.id
|
this.itemData.id
|
||||||
);
|
);
|
||||||
|
datafluxRum.addRumGlobalContext('task_type',{
|
||||||
|
name: itemData.task+'Verify'
|
||||||
|
})
|
||||||
if (errcode !== 0) {
|
if (errcode !== 0) {
|
||||||
if (errmsg == "twitter already binded") {
|
if (errmsg == "twitter already binded") {
|
||||||
this.$showErr("twitter already binded");
|
this.$showErr("twitter already binded");
|
||||||
|
@ -61,10 +61,10 @@ let errmsg = err
|
|||||||
} else if(errmsg.indexOf("Delabs Game") > -1) {
|
} else if(errmsg.indexOf("Delabs Game") > -1) {
|
||||||
errmsg = "You do not hold the required role in the 'Delabs Game' Discord server"
|
errmsg = "You do not hold the required role in the 'Delabs Game' Discord server"
|
||||||
} else if(errmsg.indexOf('Please try again') > -1) {
|
} else if(errmsg.indexOf('Please try again') > -1) {
|
||||||
errmsg = "Verification failed due to high traffic. Please click 'Connect' to try verifying again, or attempt later"
|
errmsg = "Verification failed due to high traffic. Please attempt to verify again or try later"
|
||||||
} else {
|
} else {
|
||||||
// 请重试
|
// 请重试
|
||||||
errmsg = 'Unknown on-chain interaction issue. Please try again'
|
errmsg = 'An unknown on-chain interaction error has occurred. Our technical team cannot resolve this issue directly. Please use a blockchain explorer to check your wallet address and determine if the transaction was recorded or if another issue exists.'
|
||||||
}
|
}
|
||||||
|
|
||||||
const _confirm = new iErrorMessage({
|
const _confirm = new iErrorMessage({
|
||||||
|
@ -89,9 +89,8 @@ export default {
|
|||||||
let require = {activity: this.activity, val}
|
let require = {activity: this.activity, val}
|
||||||
await this.$store.dispatch('user/login', require)
|
await this.$store.dispatch('user/login', require)
|
||||||
await this.$store.dispatch('user/fetchUserState')
|
await this.$store.dispatch('user/fetchUserState')
|
||||||
this.$gtag.event("login_info", {
|
this.eventGtag()
|
||||||
address_type: this.myAddress,
|
localStorage.setItem('myToken',localStorage.getItem('token') )
|
||||||
})
|
|
||||||
location.reload()
|
location.reload()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -141,6 +140,13 @@ export default {
|
|||||||
localStorage.removeItem('walletName')
|
localStorage.removeItem('walletName')
|
||||||
// location.reload()
|
// location.reload()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Google gtag打点
|
||||||
|
eventGtag() {
|
||||||
|
this.$gtag.event("login_info", {
|
||||||
|
address_type: this.myAddress,
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
16
src/main.js
16
src/main.js
@ -38,6 +38,22 @@ Vue.use(VueGtag, {
|
|||||||
// duration: 3 * 1000
|
// duration: 3 * 1000
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
//引入观测云rum的sdk
|
||||||
|
import { datafluxRum } from '@cloudcare/browser-rum'
|
||||||
|
datafluxRum.init({
|
||||||
|
applicationId: '20efe220_006a_11ef_941d_2d8bd5427e6e',
|
||||||
|
site: 'https://ap1-rum-openway.guance.one',
|
||||||
|
clientToken: '2OQwyC5Quls2McUi6QIUF7mzxD3ryhHDFwIMQHBBfUoiNCR_OQ',
|
||||||
|
env: process.env.VUE_APP_MODE,
|
||||||
|
version: '1.0.0',
|
||||||
|
service: 'browser',
|
||||||
|
sessionSampleRate: 100,
|
||||||
|
sessionReplaySampleRate: 70,
|
||||||
|
trackInteractions: true,
|
||||||
|
traceType: 'ddtrace', // 非必填,默认为ddtrace,目前支持 ddtrace、zipkin、skywalking_v3、jaeger、zipkin_single_header、w3c_traceparent 6种类型
|
||||||
|
allowedTracingOrigins: ['https://api.example.com',/https:\/\/.*\.my-api-domain\.com/], // 非必填,允许注入trace采集器所需header头部的所有请求列表。可以是请求的origin,也可以是是正则
|
||||||
|
});
|
||||||
|
datafluxRum.startSessionReplayRecording()
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
<span v-if="boxData.level == 1">COMMON</span>
|
<span v-if="boxData.level == 1">COMMON</span>
|
||||||
<span v-else-if="boxData.level == 2">RARE</span>
|
<span v-else-if="boxData.level == 2">RARE</span>
|
||||||
<span v-else-if="boxData.level == 3">MYTHICAL</span>
|
<span v-else-if="boxData.level == 3">MYTHICAL</span>
|
||||||
<span v-else-if="boxData.level == 4">LEGENDAY</span>
|
<span v-else-if="boxData.level == 4">LEGENDARY</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-btm-con-img">
|
<div class="box-btm-con-img">
|
||||||
@ -273,7 +273,7 @@ export default {
|
|||||||
myRecordsList: [],
|
myRecordsList: [],
|
||||||
boostingPageSize: 6,
|
boostingPageSize: 6,
|
||||||
boostingCurrentPage: 1,
|
boostingCurrentPage: 1,
|
||||||
isLoading: false
|
isLoading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -311,7 +311,6 @@ export default {
|
|||||||
|
|
||||||
// 助力进度条
|
// 助力进度条
|
||||||
filteredBoxBar() {
|
filteredBoxBar() {
|
||||||
console.log('this.boxData.bounsCount',this.boxData.bounsCount,this.boxData.maxBounsCount)
|
|
||||||
if(this.boxData.bounsCount) {
|
if(this.boxData.bounsCount) {
|
||||||
return Number(this.boxData.bounsCount) / Number(this.boxData.maxBounsCount) * 100
|
return Number(this.boxData.bounsCount) / Number(this.boxData.maxBounsCount) * 100
|
||||||
} else {
|
} else {
|
||||||
@ -468,6 +467,10 @@ export default {
|
|||||||
oInput.className = "oInput";
|
oInput.className = "oInput";
|
||||||
oInput.style.display = "none";
|
oInput.style.display = "none";
|
||||||
this.$message.success("Copy succeeded");
|
this.$message.success("Copy succeeded");
|
||||||
|
let address_type = localStorage.getItem("myAddress")
|
||||||
|
this.$gtag.event("invite_new",{
|
||||||
|
address_type: address_type,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
|
@ -643,6 +643,7 @@ import Loading from "@/components/loading.vue";
|
|||||||
import RuleDialog from "./ruleDialog.vue";
|
import RuleDialog from "./ruleDialog.vue";
|
||||||
import NftPartner from './nftPartner.vue'
|
import NftPartner from './nftPartner.vue'
|
||||||
import { getToken } from "@/utils/cookies.js";
|
import { getToken } from "@/utils/cookies.js";
|
||||||
|
import { datafluxRum } from '@cloudcare/browser-rum'
|
||||||
// import { getWalletAddress, isWalletConnected, linkWallet } from "@/wallet/index.js";
|
// import { getWalletAddress, isWalletConnected, linkWallet } from "@/wallet/index.js";
|
||||||
import {
|
import {
|
||||||
apiUploadInviteCode,
|
apiUploadInviteCode,
|
||||||
@ -836,6 +837,7 @@ export default {
|
|||||||
this.helpConfirm()
|
this.helpConfirm()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.countTime()
|
||||||
} else {
|
} else {
|
||||||
this.walletDialogVisible = true;
|
this.walletDialogVisible = true;
|
||||||
}
|
}
|
||||||
@ -894,7 +896,7 @@ export default {
|
|||||||
await this.getProgress();
|
await this.getProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.rumGtag(data.task)
|
||||||
if (data.task == "TwitterConnect") {
|
if (data.task == "TwitterConnect") {
|
||||||
await this.loginTwitter(data.id);
|
await this.loginTwitter(data.id);
|
||||||
} else if(data.task == "TwitterFollow") {
|
} else if(data.task == "TwitterFollow") {
|
||||||
@ -1270,6 +1272,10 @@ export default {
|
|||||||
oInput.className = "oInput";
|
oInput.className = "oInput";
|
||||||
oInput.style.display = "none";
|
oInput.style.display = "none";
|
||||||
this.$message.success("Copy succeeded");
|
this.$message.success("Copy succeeded");
|
||||||
|
let address_type = localStorage.getItem("myAddress")
|
||||||
|
this.$gtag.event("invite_new",{
|
||||||
|
address_type: address_type,
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.walletDialogVisible = true;
|
this.walletDialogVisible = true;
|
||||||
}
|
}
|
||||||
@ -1359,6 +1365,41 @@ export default {
|
|||||||
openLink() {
|
openLink() {
|
||||||
window.open('https://medium.com/@CounterFire/hills-treasure-hunt-3d076f637838')
|
window.open('https://medium.com/@CounterFire/hills-treasure-hunt-3d076f637838')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 事件点打点
|
||||||
|
countTime: function() {
|
||||||
|
var now = new Date().getTime()
|
||||||
|
let refreshTime = new Date(new Date().toLocaleDateString()).getTime()+86400000
|
||||||
|
// +86400000; .getTime()
|
||||||
|
let leftTime = refreshTime - now
|
||||||
|
if(leftTime <= 0) {
|
||||||
|
this.eventGtag()
|
||||||
|
}
|
||||||
|
setTimeout(this.countTime, 1000);
|
||||||
|
},
|
||||||
|
// 倒计时更新登录
|
||||||
|
clearEndTime(startTime) {
|
||||||
|
if(startTime == 0){
|
||||||
|
let interval_id = setInterval(()=> {
|
||||||
|
clearInterval(interval_id)
|
||||||
|
// window.location.reload()
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// Google gtag打点
|
||||||
|
eventGtag() {
|
||||||
|
let address_type = localStorage.getItem('myAdderss')
|
||||||
|
this.$gtag.event("login_info", {
|
||||||
|
address_type: address_type,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 观测云 埋点
|
||||||
|
rumGtag(name) {
|
||||||
|
datafluxRum.addRumGlobalContext('task_type', {
|
||||||
|
name: name,
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user