analytics.ejs 333 B

1234567891011
  1. <% var title = "" %>
  2. <% if(page.canonical_path == 'index.html') { title = "Landing Page" %>
  3. <% } else { title = page.title } %>
  4. <script>
  5. if (location.hostname !== "localhost" && location.hostname !== "127.0.0.1"){
  6. mixpanel.track("<%- title %>");
  7. } else {
  8. console.log('No tracking in ' + location.hostname);
  9. }
  10. </script>