diff --git a/src/nginxconfig/templates/app.vue b/src/nginxconfig/templates/app.vue
index ebe6a46..7381f2c 100644
--- a/src/nginxconfig/templates/app.vue
+++ b/src/nginxconfig/templates/app.vue
@@ -33,10 +33,10 @@ THE SOFTWARE.
-
+
{{ i18n.templates.app.singleColumnMode }}
-
+
{{ i18n.templates.app.splitColumnMode }}
@@ -161,6 +161,9 @@ THE SOFTWARE.
// The config file watcher will handle setting the app as ready
const query = window.location.search || window.location.hash.slice(1);
importData(query, this.$data.domains, this.$data.global, this.$nextTick);
+
+ // Send an initial GA event for column mode
+ this.splitColumnEvent(false);
},
methods: {
changes(index) {
@@ -229,6 +232,25 @@ THE SOFTWARE.
});
this.$nextTick(() => this.$data.confWatcherWaiting = false);
},
+ splitColumnToggle() {
+ this.$data.splitColumn = !this.$data.splitColumn;
+ this.splitColumnEvent(true);
+ },
+ splitColumnEvent(interact) {
+ if (window.ga) {
+ const tracker = window.ga.getAll()[0];
+ if (tracker) {
+ tracker.send({
+ hitType: 'event',
+ eventCategory: 'Button',
+ eventAction: 'toggle',
+ eventLabel: 'Split Column',
+ eventValue: Number(this.$data.splitColumn),
+ nonInteraction: !interact,
+ });
+ }
+ }
+ },
},
};