Wrong API URL for GTM

Open Beginner friendly
#5,200 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
elixir
Domain
frontend

Research direction

Locate the GTM installation wizard and the code that sets script.dataset.api; start by tracing how the self-hosted domain is made available there. Update the wizard so the generated value uses the deployed self-hosted domain rather than https://plausible.io, then verify the generated snippet for a self-hosted installation.

Written by the indexing model from the issue text.

Description

Past Issues Searched
  • I have searched open and closed issues to make sure that the bug has not yet been reported
Issue is a Bug Report
  • This is a bug report and not a feature request, nor asking for self-hosted support
Using official Plausible Cloud hosting or self-hosting?

Self-hosting

Describe the bug

The script.dataset.api for the GTM installation wizard is wrong.

In this case, the Plausible Cloud address is displayed, whereas the domain where the Self-hosted version is deployed should be displayed.

Expected behavior

The GTM installation wizard should be filled using the correct self-hosted domain.

Current value: https://plausible.io/api/event
Correct value: https://plausible.example.com/api/event

Screenshots

Image

Environment
- OS: Ubuntu
- Browser: Firefox
- Browser Version: 136.0.1
Dominant language
Elixir
Stars
29.2k
Forks
1.9k
Avg merge
3d 11h
Merged PRs (30d)
39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plausible/analytics

All issues in plausible/analytics

Similar issues

More Elixir issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.