Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get analytics to work #1560

Closed
unapologeticaf opened this issue Nov 2, 2024 · 13 comments
Closed

I can't get analytics to work #1560

unapologeticaf opened this issue Nov 2, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@unapologeticaf
Copy link

I am trying to add Umami analytics to my Quartz setup, but it's not hooking up correctly. I tried to put my IDs and URLs in different formats, with <>, without, with http, https, without... Umami is not picking it up.

I'm not tech savvy enough to properly fill-in this bug report, but I have a feeling it might be because Umami doesn't support github pages URLs like https://unapologeticaf.github.io/digital-garden/?

If so of course this is not a bug report 😅

@unapologeticaf unapologeticaf added the bug Something isn't working label Nov 2, 2024
@saberzero1
Copy link
Collaborator

Try using the same URL as your baseUrl.

@unapologeticaf
Copy link
Author

Try using the same URL as your baseUrl.

I'm not sure what you mean, sorry :( but thanks for answering. So, here's my Quartz setup:

analytics: { provider: 'umami', host: 'unapologeticaf.github.io', websiteId: 'xxxxxxxx' }

and this is what I have in Umami:

image

I can't put that full URL in Umami tho, no forward slashes nor https in that textbox

@saberzero1
Copy link
Collaborator

Try using the same URL as your baseUrl.

I'm not sure what you mean, sorry :( but thanks for answering. So, here's my Quartz setup:

analytics: { provider: 'umami', host: 'unapologeticaf.github.io', websiteId: 'xxxxxxxx' }

and this is what I have in Umami:

image

I can't put that full URL in Umami tho, no forward slashes nor https in that textbox

Your URL isn't unapologeticaf.github.io. It is unapologeticaf.github.io/digital-garden

@unapologeticaf
Copy link
Author

Your URL isn't unapologeticaf.github.io. It is unapologeticaf.github.io/digital-garden

I can put it into the Quartz config, but I can put it that way on Umami.. do I need a custom domain?

@saberzero1
Copy link
Collaborator

Your URL isn't unapologeticaf.github.io. It is unapologeticaf.github.io/digital-garden

I can put it into the Quartz config, but I can put it that way on Umami.. do I need a custom domain?

Hold on, based on the docs, shouldn't your Umami URL point to your Umami hosting? Not your Quartz site.

@unapologeticaf
Copy link
Author

Hold on, based on the docs, shouldn't your Umami URL point to your Umami hosting? Not your Quartz site.

by "Umami URL" you mean the URL in the Quartz config? if I'm just using Umami from their free tier, what would my hosting be? I'm not self-hosting

@saberzero1
Copy link
Collaborator

host in your Quartz settings should point to where Umami sends its data. I suspect Umami gave you a link that looks something like this: *.umami.is/*

@sudo0x18
Copy link

sudo0x18 commented Nov 6, 2024

Hey Guys,
I am also facing the same issue. I am trying to add google analytics but it's not getting parsed and added to compiled HTML source code.

2024-11-06 17_47_28-Windows 10 Flare - VMware Workstation
2024-11-06 17_46_20-quartz config ts - quartz - Visual Studio Code

@saberzero1
Copy link
Collaborator

Hey Guys, I am also facing the same issue. I am trying to add google analytics but it's not getting parsed and added to compiled HTML source code.

2024-11-06 17_47_28-Windows 10 Flare - VMware Workstation 2024-11-06 17_46_20-quartz config ts - quartz - Visual Studio Code

Can you fix your baseUrl and try again?

@sudo0x18
Copy link

2024-11-15 01_19_30-quartz config ts - sudo0x18 github io - Visual Studio Code

I have fixed the baseUrl and added Complete URL but still it is not working.

@saberzero1
Copy link
Collaborator

2024-11-15 01_19_30-quartz config ts - sudo0x18 github io - Visual Studio Code

I have fixed the baseUrl and added Complete URL but still it is not working.

That is not the correct baseUrl.

Assuming you have no custom domain and are using GitHub Pages, it should be <username>.githib.io/<project-name>.

See:

@topdeoo
Copy link

topdeoo commented Dec 17, 2024

Hold on, based on the docs, shouldn't your Umami URL point to your Umami hosting? Not your Quartz site.

by "Umami URL" you mean the URL in the Quartz config? if I'm just using Umami from their free tier, what would my hosting be? I'm not self-hosting

Hi, I believe that when you finished setting umami, umami would give a html tag like this:

<script defer src="https://cloud.umami.is/script.js" data-website-id="xxxxx"></script>

You could get this in the Tracking code, the link will be https://cloud.umami.is/settings/websites/

Then, you should set the analytics in quartz.config.ts like this:

  analytics: {
    provider: "umami",
    websiteId: "xxxxxx",
    host: "https://cloud.umami.is/script.js"
  },

The baseURL should be unapologeticaf.github.io/digital-garden.

Hope this helps.

@aarnphm
Copy link
Collaborator

aarnphm commented Dec 18, 2024

I will close given that it seems like a user setup problem.

@aarnphm aarnphm closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants