diff --git a/src/main/java/io/papermc/hangar/config/hangar/HangarConfig.java b/src/main/java/io/papermc/hangar/config/hangar/HangarConfig.java
index e43b10f39..44dc77211 100644
--- a/src/main/java/io/papermc/hangar/config/hangar/HangarConfig.java
+++ b/src/main/java/io/papermc/hangar/config/hangar/HangarConfig.java
@@ -30,6 +30,7 @@ public class HangarConfig {
private final ApplicationHome home = new ApplicationHome(HangarApplication.class);
private String pluginUploadDir = home.getDir().toPath().resolve("work").toString();
private String baseUrl = "https://localhost:8080";
+ private String gaCode = "";
@NestedConfigurationProperty
public final FakeUserConfig fakeUser;
@@ -191,6 +192,14 @@ public class HangarConfig {
this.baseUrl = baseUrl;
}
+ public String getGaCode() {
+ return gaCode;
+ }
+
+ public void setGaCode(String gaCode) {
+ this.gaCode = gaCode;
+ }
+
public void checkDebug() {
if (!debug) {
throw new UnsupportedOperationException("this function is supported in debug mode only");
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index be099aa79..c4b54c7fe 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -49,6 +49,7 @@ hangar:
auth-url: "http://localhost:8000"
base-url: "http://localhost:8080"
use-webpack: true
+ ga-code: "UA-38006759-9"
sponsors:
- name: Beer
diff --git a/src/main/resources/templates/layout/base.ftlh b/src/main/resources/templates/layout/base.ftlh
index 6d33e8363..1a4345a8b 100644
--- a/src/main/resources/templates/layout/base.ftlh
+++ b/src/main/resources/templates/layout/base.ftlh
@@ -51,13 +51,13 @@ showFooter: Boolean = true, noContainer: Boolean = false, additionalMeta: Html =
<#-- google foo -->
-
+