the requirement of the product manager is that some routes are tracked by Yumeng An account, and some routes are tracked by Yumeng B account.
the project is a vue single-page application, automatic tracking has been turned off, and the account is tracked manually according to the route.
index.html
<script type="text/javascript">
/**/var _czc = _czc || [];_czc.push(["_setAutoPageView", false]);
</script>
<body>
App.vue
watch: {
"$route"() {
//
if(/.../.test(this.$route.path)) {
_czc.push(["_setAccount", siteIdA])
} else {
_czc.push(["_setAccount", siteIdB])
}
let location = window.location
let content_url = location.pathname + location.hash
let referer_url = "/"
_czc.push(["_trackPageview", content_url, referer_url])
}
}
now look at Youmeng"s backend data. AB accounts all have each other"s page path. Ask how to write 2 accounts
.