Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

rename analytics.js to script.js

Bill Yange618fce4cdf0
diff --git a/client/src/app/[site]/components/NoData.tsx b/client/src/app/[site]/components/NoData.tsx
index 0bcd2a4f5..902041bf5 100644
--- a/client/src/app/[site]/components/NoData.tsx
+++ b/client/src/app/[site]/components/NoData.tsx
@@ -27,7 +27,7 @@ export function NoData({
</div>
<CodeSnippet
language="HTML"
- code={`<script\n src="${BACKEND_URL}/analytics.js"\n site-id="${siteMetadata?.site_id}"\n defer\n/>`}
+ code={`<script\n src="${BACKEND_URL}/script.js"\n site-id="${siteMetadata?.site_id}"\n defer\n/>`}
/>
</div>
</CardContent>
diff --git a/server/public/example.html b/server/public/example.html
index 6f18d63d8..d04bd5d06 100644
--- a/server/public/example.html
+++ b/server/public/example.html
@@ -13,7 +13,7 @@
</button>
<!-- Add the analytics script -->
- <script src="/analytics.js"></script>
+ <script src="/script.js"></script>
<!-- Example of tracking custom events -->
<script>
diff --git a/server/public/analytics.js b/server/public/script.js
similarity index 96%
rename from server/public/analytics.js
rename to server/public/script.js
index 38c432559..7ba9a031a 100644
--- a/server/public/analytics.js
+++ b/server/public/script.js
@@ -2,9 +2,7 @@
(function () {
// Get the script tag that loaded this script
const scriptTag = document.currentScript;
- const ANALYTICS_HOST = scriptTag
- .getAttribute("src")
- .split("/analytics.js")[0];
+ const ANALYTICS_HOST = scriptTag.getAttribute("src").split("/script.js")[0];
if (!ANALYTICS_HOST) {
console.error("Please provide a valid analytics host");
diff --git a/test/about.html b/test/about.html
index 20a3b9eb3..58ffcc353 100644
--- a/test/about.html
+++ b/test/about.html
@@ -23,6 +23,6 @@
<footer>
<p>&copy; 2025 Test Site</p>
</footer>
- <script src="http://localhost:3001/analytics.js"></script>
+ <script src="http://localhost:3001/script.js"></script>
</body>
</html>
\ No newline at end of file
diff --git a/test/contact.html b/test/contact.html
index d40caee85..af0f92b9c 100644
--- a/test/contact.html
+++ b/test/contact.html
@@ -23,6 +23,6 @@
<footer>
<p>&copy; 2025 Test Site</p>
</footer>
- <script src="http://localhost:3001/analytics.js"></script>
+ <script src="http://localhost:3001/script.js"></script>
</body>
</html>
\ No newline at end of file
diff --git a/test/index.html b/test/index.html
index e088fd27d..d9d207d38 100644
--- a/test/index.html
+++ b/test/index.html
@@ -23,6 +23,6 @@
<footer>
<p>&copy; 2025 Test Site</p>
</footer>
- <script src="http://localhost:3001/analytics.js"></script>
+ <script src="http://localhost:3001/script.js"></script>
</body>
</html>
\ No newline at end of file