mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Move environment variables to middleware. Closes #972.
This commit is contained in:
parent
736347d37c
commit
7270d95240
6 changed files with 47 additions and 30 deletions
|
|
@ -5,8 +5,6 @@ import Button from 'components/common/Button';
|
|||
import FormLayout, { FormButtons, FormRow } from 'components/layout/FormLayout';
|
||||
import CopyButton from 'components/common/CopyButton';
|
||||
|
||||
const scriptName = process.env.TRACKER_SCRIPT_NAME || 'umami';
|
||||
|
||||
export default function TrackingCodeForm({ values, onClose }) {
|
||||
const ref = useRef();
|
||||
const { basePath } = useRouter();
|
||||
|
|
@ -26,7 +24,7 @@ export default function TrackingCodeForm({ values, onClose }) {
|
|||
rows={3}
|
||||
cols={60}
|
||||
spellCheck={false}
|
||||
defaultValue={`<script async defer data-website-id="${values.website_uuid}" src="${document.location.origin}${basePath}/${scriptName}.js"></script>`}
|
||||
defaultValue={`<script async defer data-website-id="${values.website_uuid}" src="${document.location.origin}${basePath}/umami.js"></script>`}
|
||||
readOnly
|
||||
/>
|
||||
</FormRow>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue