diff --git a/app/composables/eventOrder.ts b/app/composables/eventOrder.ts index 24b8cf0..144a54d 100644 --- a/app/composables/eventOrder.ts +++ b/app/composables/eventOrder.ts @@ -21,9 +21,9 @@ export const _useEventOrder = () => { const refererNote = computed(() => { const key = refererKey.value as keyof typeof REFERRER_MAP; - return key in REFERRER_MAP ? `推薦單位:${REFERRER_MAP[key]}` : ""; + return key in REFERRER_MAP ? REFERRER_MAP[key] : ""; }); - + function formatLocalDate(date: Date): string { const y = date.getFullYear(); const m = String(date.getMonth() + 1).padStart(2, "0"); diff --git a/nuxt.config.ts b/nuxt.config.ts index 3f94e4e..a29df84 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -4,4 +4,16 @@ export default defineNuxtConfig({ devtools: { enabled: true }, modules: ["@nuxt/ui"], css: ["~/assets/css/main.css"], + app: { + head: { + titleTemplate: "%s | Tootaio Studio", + title: "报价单", + script: [ + { + src: "/analytics.js", + tagPosition: "head", + }, + ], + }, + }, }); diff --git a/public/analytics.js b/public/analytics.js new file mode 100644 index 0000000..5ccc5fe --- /dev/null +++ b/public/analytics.js @@ -0,0 +1,10 @@ +(function () { + const UMAMI_SCRIPT_JS = "https://umami.tootaio.com/script.js"; + const UMAMI_ID = "dcb8b7ff-408c-4843-9a1a-c01da704ffc1"; + + var script = document.createElement("script"); + script.async = true; + script.src = UMAMI_SCRIPT_JS; + script.setAttribute("data-website-id", UMAMI_ID); + document.head.appendChild(script); +})();