feat(tagmanager): support to add google tagmanager id, closes #2569
This commit is contained in:
@@ -17,6 +17,7 @@ type LoginCommand struct {
|
||||
|
||||
type CurrentUser struct {
|
||||
IsSignedIn bool `json:"isSignedIn"`
|
||||
Id int64 `json:"id"`
|
||||
Login string `json:"login"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
|
||||
@@ -13,6 +13,7 @@ func setIndexViewData(c *middleware.Context) error {
|
||||
}
|
||||
|
||||
currentUser := &dtos.CurrentUser{
|
||||
Id: c.UserId,
|
||||
IsSignedIn: c.IsSignedIn,
|
||||
Login: c.Login,
|
||||
Email: c.Email,
|
||||
@@ -47,6 +48,10 @@ func setIndexViewData(c *middleware.Context) error {
|
||||
c.Data["GoogleAnalyticsId"] = setting.GoogleAnalyticsId
|
||||
}
|
||||
|
||||
if setting.GoogleTagManagerId != "" {
|
||||
c.Data["GoogleTagManagerId"] = setting.GoogleTagManagerId
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user