-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
34 lines (28 loc) · 952 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ga-tracker</title>
</head>
<body>
<script src="ga-tracker.js"></script>
<script>
const { Event, GoogleAnalytics, PageViewEvent } = gaTracker
const campaignUrl =
'utm_id=valtech&utm_source=wechat&utm_medium=cbmm&utm_campaign=meeting&utm_term=click&utm_content=save'
const ga = new GoogleAnalytics()
const tracker = ga.getTracker('G-WT8RKKF7NM')
tracker.setTrackerServer(
'https://ga-proxy-1651970-1306334697.ap-shanghai.run.tcloudbase.com/ga'
)
const event = new PageViewEvent()
event.setParams({
page_title: '去看钢铁侠'
})
event.setCampaignParamsFromUrl(campaignUrl)
tracker.send(event)
</script>
</body>
</html>