mirror of
https://github.com/ash-project/ash_hq.git
synced 2024-09-19 21:03:30 +12:00
improvement: WIP, add analytics
This commit is contained in:
parent
fa68f3e819
commit
8289f3292c
3 changed files with 5 additions and 1 deletions
|
@ -264,7 +264,6 @@ window.addEventListener("phx:close-search", (event) => {
|
|||
// connect if there are any LiveViews on the page
|
||||
liveSocket.connect()
|
||||
|
||||
|
||||
// expose liveSocket on window for web console debug logs and latency simulation:
|
||||
liveSocket.disableDebug()
|
||||
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session
|
||||
|
|
|
@ -16,6 +16,8 @@ config :ash_hq, AshHqWeb.Endpoint,
|
|||
# Do not print debug messages in production
|
||||
config :logger, level: :info
|
||||
|
||||
config :ash_hq, :analytics?, true
|
||||
|
||||
# ## SSL Support
|
||||
#
|
||||
# To get SSL working, you will need to add the `https` key
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<%= csrf_meta_tag() %>
|
||||
<%= live_title_tag assigns[:page_title] || "Ash Framework" %>
|
||||
<%= if Application.get_env(:ash_hq, :analytics?) do %>
|
||||
<script defer data-domain="ash-hq.org" src="https://plausible.io/js/plausible.js"></script>
|
||||
<% end %>
|
||||
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/assets/app.css") %>"/>
|
||||
<script>
|
||||
const configuredThemeRow = document.cookie
|
||||
|
|
Loading…
Reference in a new issue