Skip to content

Commit

Permalink
fix: make tag reactive
Browse files Browse the repository at this point in the history
  • Loading branch information
ijkml committed Nov 29, 2024
1 parent 21cba22 commit 88347e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/composables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function getStaticPayload(): StaticPayload {
navigator: { language },
} = window;

const tag = window.localStorage.getItem('umami.tag') || config.tag;
const { tag } = config;

staticPayload = {
hostname,
Expand All @@ -79,9 +79,11 @@ function getPayload(): ViewPayload {

const ref = referrer || getQueryRef();
const url = buildPathUrl();
const tag = window.localStorage.getItem('umami.tag');

return {
...getStaticPayload(),
...(tag ? { tag } : null),
url: encodeURI(url),
referrer: encodeURI(ref),
title: encodeURIComponent(title),
Expand Down

0 comments on commit 88347e5

Please sign in to comment.