Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/src/main/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<script defer src="js/adult-releases.js?v=817"></script>
<script defer src="js/router.js?v=817"></script>
<script defer src="js/source-classification.js?v=817"></script>
<script defer src="js/analytics.js?v=817"></script>
<script defer src="client.js?v=817"></script>
</head>
<body>
Expand Down
31 changes: 31 additions & 0 deletions android/app/src/main/assets/js/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Vercel Web Analytics initialization
// This script injects Vercel Analytics tracking into the application

(function() {
// Analytics will only track in production mode (when deployed to Vercel)
// In development, events are logged to console for debugging

// Import inject function from @vercel/analytics
// Note: Since this is a vanilla JS project, we use a dynamic import
// that will be resolved during the build process

if (typeof window !== 'undefined') {
// Check if we're in production (deployed to Vercel)
const isProduction = window.location.hostname !== 'localhost' &&
window.location.hostname !== '127.0.0.1';

// Initialize analytics tracking script
// The script will be loaded from Vercel's CDN when deployed
(function() {
window.va = window.va || function() {
(window.vaq = window.vaq || []).push(arguments);
};
})();

// Inject the analytics script
const script = document.createElement('script');
script.defer = true;
script.src = '/_vercel/insights/script.js';
document.head.appendChild(script);
}
})();
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<script defer src="js/adult-releases.js?v=817"></script>
<script defer src="js/router.js?v=817"></script>
<script defer src="js/source-classification.js?v=817"></script>
<script defer src="js/analytics.js?v=817"></script>
<script defer src="client.js?v=817"></script>
</head>
<body>
Expand Down
31 changes: 31 additions & 0 deletions js/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Vercel Web Analytics initialization
// This script injects Vercel Analytics tracking into the application

(function() {
// Analytics will only track in production mode (when deployed to Vercel)
// In development, events are logged to console for debugging

// Import inject function from @vercel/analytics
// Note: Since this is a vanilla JS project, we use a dynamic import
// that will be resolved during the build process

if (typeof window !== 'undefined') {
// Check if we're in production (deployed to Vercel)
const isProduction = window.location.hostname !== 'localhost' &&
window.location.hostname !== '127.0.0.1';

// Initialize analytics tracking script
// The script will be loaded from Vercel's CDN when deployed
(function() {
window.va = window.va || function() {
(window.vaq = window.vaq || []).push(arguments);
};
})();

// Inject the analytics script
const script = document.createElement('script');
script.defer = true;
script.src = '/_vercel/insights/script.js';
document.head.appendChild(script);
}
})();
91 changes: 43 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"dependencies": {
"@supabase/ssr": "^0.12.0",
"@supabase/supabase-js": "^2.108.1",
"@vercel/analytics": "^2.0.1",
"hls.js": "^1.6.16",
"sharp": "0.35.2"
},
Expand Down
Loading