diff --git a/src/public/layouts/layout.eta b/src/public/layouts/layout.eta index ab5d0e6..952757c 100644 --- a/src/public/layouts/layout.eta +++ b/src/public/layouts/layout.eta @@ -24,6 +24,10 @@ } else { gtag('consent', 'default', JSON.parse(localStorage.getItem('consentMode'))); } + + if(localStorage.getItem('userId') != null) { + window.dataLayer.push({'user_id': localStorage.getItem('userId')}); + } - \ No newline at end of file + diff --git a/src/public/login.eta b/src/public/login.eta new file mode 100644 index 0000000..39833a7 --- /dev/null +++ b/src/public/login.eta @@ -0,0 +1,83 @@ +<% layout("layout", { title: "Login - GA Tutorials" }) %> + +<%~ includeFile("nav") %> + +
+

Simulate login to set User ID

+
+
+ + + This form simply + sets your User ID so tagging will include it in events. To log out, submit + the form without a value. +
+ + + +
+
+ + + +<%~ includeFile("footer.eta") %> + \ No newline at end of file diff --git a/src/public/newsletter.eta b/src/public/newsletter.eta index cea8ff9..8de1a82 100644 --- a/src/public/newsletter.eta +++ b/src/public/newsletter.eta @@ -6,7 +6,7 @@

Signup for our Newsletter

- + This form does not save your email. It is for the diff --git a/src/public/partials/debug.eta b/src/public/partials/debug.eta new file mode 100644 index 0000000..91ff977 --- /dev/null +++ b/src/public/partials/debug.eta @@ -0,0 +1,75 @@ +
+ + +
+ + +
+ + + + + + + + +
+
+ + diff --git a/src/public/partials/footer.eta b/src/public/partials/footer.eta index 0b58f19..0f0db21 100644 --- a/src/public/partials/footer.eta +++ b/src/public/partials/footer.eta @@ -23,7 +23,7 @@
Subscribe to our newsletter

This is a demo and does not save your email.

- +
diff --git a/src/public/partials/nav.eta b/src/public/partials/nav.eta index 6d56cdd..30cb114 100644 --- a/src/public/partials/nav.eta +++ b/src/public/partials/nav.eta @@ -15,6 +15,9 @@ +