mirror of
https://github.com/kremalicious/umami.git
synced 2024-09-27 11:48:48 +02:00
17 lines
498 B
JavaScript
17 lines
498 B
JavaScript
|
import { TextArea } from 'react-basics';
|
||
|
import { TRACKER_SCRIPT_URL } from 'lib/constants';
|
||
|
|
||
|
export default function TrackingCode({ websiteId }) {
|
||
|
const code = `<script async src="${TRACKER_SCRIPT_URL}" data-website-id="${websiteId}"></script>`;
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
<p>
|
||
|
To track stats for this website, place the following code in the <code><head></code>{' '}
|
||
|
section of your HTML.
|
||
|
</p>
|
||
|
<TextArea rows={4} value={code} readOnly allowCopy />
|
||
|
</>
|
||
|
);
|
||
|
}
|