feat(tagmanager): support to add google tagmanager id, closes #2569

This commit is contained in:
Torkel Ödegaard
2015-08-21 09:30:39 +02:00
parent 7072af7c14
commit 3d37c9c9a3
6 changed files with 31 additions and 4 deletions
+1
View File
@@ -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"`
+5
View File
@@ -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
}