Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Add `.IndividualTracking` to public templates. Closes #1663.

Kailash Nadh6cb9982aacc1
diff --git a/cmd/init.go b/cmd/init.go
index 03c9f475..bda3c4ec 100644
--- a/cmd/init.go
+++ b/cmd/init.go
@@ -769,6 +769,7 @@ func initHTTPServer(app *App) *echo.Echo {
AssetVersion: app.constants.AssetVersion,
EnablePublicSubPage: app.constants.EnablePublicSubPage,
EnablePublicArchive: app.constants.EnablePublicArchive,
+ IndividualTracking: app.constants.Privacy.IndividualTracking,
}
// Initialize the static file server.
diff --git a/cmd/public.go b/cmd/public.go
index cb2ddd32..cb970e32 100644
--- a/cmd/public.go
+++ b/cmd/public.go
@@ -33,6 +33,7 @@ type tplRenderer struct {
AssetVersion string
EnablePublicSubPage bool
EnablePublicArchive bool
+ IndividualTracking bool
}
// tplData is the data container that is injected
@@ -45,6 +46,7 @@ type tplData struct {
AssetVersion string
EnablePublicSubPage bool
EnablePublicArchive bool
+ IndividualTracking bool
Data interface{}
L *i18n.I18n
}
@@ -99,6 +101,7 @@ func (t *tplRenderer) Render(w io.Writer, name string, data interface{}, c echo.
AssetVersion: t.AssetVersion,
EnablePublicSubPage: t.EnablePublicSubPage,
EnablePublicArchive: t.EnablePublicArchive,
+ IndividualTracking: t.IndividualTracking,
Data: data,
L: c.Get("app").(*App).i18n,
})