Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f1a652

Browse files
committed
加上媒体信息
1 parent 86fe383 commit 3f1a652

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/http/controller/index.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (IndexController) WrapUrl(ctx echo.Context) error {
137137
} else {
138138
tUrl += "?"
139139
}
140-
tUrl += "hmsr=studygolang.com&utm_medium=studygolang.com&utm_source=studygolang.com"
140+
tUrl += "utm_campaign=studygolang.com&utm_medium=studygolang.com&utm_source=studygolang.com"
141141

142142
if CheckIsHttps(ctx) {
143143
return ctx.Redirect(http.StatusSeeOther, tUrl)
@@ -204,5 +204,11 @@ func (IndexController) Markdown(ctx echo.Context) error {
204204
// Link 用于重定向外部链接,比如广告链接
205205
func (IndexController) Link(ctx echo.Context) error {
206206
tUrl := ctx.QueryParam("url")
207+
if strings.Contains(tUrl, "?") {
208+
tUrl += "&"
209+
} else {
210+
tUrl += "?"
211+
}
212+
tUrl += "utm_campaign=studygolang.com&utm_medium=studygolang.com&utm_source=studygolang.com"
207213
return ctx.Redirect(http.StatusSeeOther, tUrl)
208214
}

0 commit comments

Comments
 (0)