-
Notifications
You must be signed in to change notification settings - Fork 12
/
router_segment_settings_handler.go
59 lines (57 loc) · 1.1 KB
/
router_segment_settings_handler.go
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package main
import (
"fmt"
"github.com/gin-gonic/gin"
"net/http"
)
func (r *Router) SettingsHandler(c *gin.Context) {
writeKey := c.Param("writeKey")
c.Data(http.StatusOK, "application/json", []byte(fmt.Sprintf(`{
"integrations": {
"Actions Google Analytic 4": {
"versionSettings": {
"componentTypes": []
}
},
"Segment.io": {
"apiKey": "%s",
"unbundledIntegrations": [],
"addBundledMetadata": true,
"maybeBundledConfigIds": {},
"versionSettings": {
"version": "4.4.7",
"componentTypes": [
"browser"
]
}
}
},
"plan": {
"track": {
"__default": {
"enabled": true,
"integrations": {}
}
},
"identify": {
"__default": {
"enabled": true
}
},
"group": {
"__default": {
"enabled": true
}
}
},
"edgeFunction": {},
"analyticsNextEnabled": true,
"middlewareSettings": {},
"enabledMiddleware": {},
"metrics": {
"sampleRate": 0.1
},
"legacyVideoPluginsEnabled": false,
"remotePlugins": []
}`, writeKey)))
}