diff --git a/static/functions/_middleware.js b/static/functions/_middleware.js
index ce4accb..b5a1508 100644
--- a/static/functions/_middleware.js
+++ b/static/functions/_middleware.js
@@ -16,53 +16,53 @@ async function redirect_secondary_domains(context) {
return context.next();
}
-async function goat_counter_analytics(context) {
- // We require some env vars to be set. If they are not, fail the request
- if (!context.env.GOAT_COUNTER_API_KEY) {
- return new Response('$GOAT_COUNTER_API_KEY is not set', { status: 500, headers: { 'Content-Type': 'text/plain' } });
- }
- if (!context.env.GOAT_COUNTER_SITE_CODE) {
- return new Response('$GOAT_COUNTER_SITE_CODE is not set', { status: 500, headers: { 'Content-Type': 'text/plain' } });
- }
+// async function goat_counter_analytics(context) {
+// // We require some env vars to be set. If they are not, fail the request
+// if (!context.env.GOAT_COUNTER_API_KEY) {
+// return new Response('$GOAT_COUNTER_API_KEY is not set', { status: 500, headers: { 'Content-Type': 'text/plain' } });
+// }
+// if (!context.env.GOAT_COUNTER_SITE_CODE) {
+// return new Response('$GOAT_COUNTER_SITE_CODE is not set', { status: 500, headers: { 'Content-Type': 'text/plain' } });
+// }
- // Parse the request URL
- let url = new URL(context.request.url);
+// // Parse the request URL
+// let url = new URL(context.request.url);
- // Build the payload to send to GoatCounter
- var payload = {
- hits: [
- {
- path: url.pathname,
- query: url.searchParams.toString(),
- ref: context.request.headers.get('Referer'),
- location: context.request.cf.country,
- user_agent: context.request.headers.get('User-Agent'),
- session: context.request.cf.botManagement.ja3Hash
- }
- ]
- };
+// // Build the payload to send to GoatCounter
+// var payload = {
+// hits: [
+// {
+// path: url.pathname,
+// query: url.searchParams.toString(),
+// ref: context.request.headers.get('Referer'),
+// location: context.request.cf.country,
+// user_agent: context.request.headers.get('User-Agent'),
+// session: context.request.cf.botManagement.ja3Hash
+// }
+// ]
+// };
- // Count the goat
- fetch(`https://${context.env.GOAT_COUNTER_SITE_CODE}.goatcounter.com/api/v0/count`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- 'Authorization': 'Bearer ' + context.env.GOAT_COUNTER_API_KEY,
- },
- body: JSON.stringify(payload),
- });
+// // Count the goat
+// fetch(`https://${context.env.GOAT_COUNTER_SITE_CODE}.goatcounter.com/api/v0/count`, {
+// method: 'POST',
+// headers: {
+// 'Content-Type': 'application/json',
+// 'Authorization': 'Bearer ' + context.env.GOAT_COUNTER_API_KEY,
+// },
+// body: JSON.stringify(payload),
+// });
- // Execute the rest of the request chain
- let response = await context.next();
+// // Execute the rest of the request chain
+// let response = await context.next();
- // For debugging, allow the requester to expose the body through a response header
- if (url.searchParams.get('goat-counter-debug') == 'true') {
- response.headers.set('X-GoatCounter-Payload', JSON.stringify(payload));
- }
+// // For debugging, allow the requester to expose the body through a response header
+// if (url.searchParams.get('goat-counter-debug') == 'true') {
+// response.headers.set('X-GoatCounter-Payload', JSON.stringify(payload));
+// }
- // Return the response
- return response;
-}
+// // Return the response
+// return response;
+// }
// Chaining
-export const onRequest = [redirect_secondary_domains, goat_counter_analytics];
\ No newline at end of file
+export const onRequest = [redirect_secondary_domains];//, goat_counter_analytics];
\ No newline at end of file
diff --git a/templates/components/metadata/analytics.html b/templates/components/metadata/analytics.html
index 02cf914..b9f2140 100644
--- a/templates/components/metadata/analytics.html
+++ b/templates/components/metadata/analytics.html
@@ -1,4 +1,6 @@
-
+
+