Skip to content

Commit 74ac1b0

Browse files
authored
Merge pull request #66 from UW-Macrostrat/heatmap
Heatmap
2 parents 45c3a78 + 0b5abf9 commit 74ac1b0

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

pages/heatmap/+Page.client.ts

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,31 +138,44 @@ function Map({coords}) {
138138
}
139139

140140
function getAllCoords() {
141-
return useAPIResult('/api/matomo', {
142-
date: '2025-01-01,today',
141+
return useAPIResult('https://analytics.svc.macrostrat.org', {
142+
date: '2025-07-01,today',
143143
period: 'range',
144144
filter_limit: 10000,
145145
filter_offset: 0,
146146
showColumns: 'latitude,longitude',
147147
doNotFetchActions: true,
148+
module: 'API',
149+
idSite: '1',
150+
format: 'json',
151+
token_auth: import.meta.env.VITE_MATOMO_API_TOKEN,
152+
method: 'Live.getLastVisitsDetails',
148153
})
149154
}
150155

151156
function getTodayCoords(): Array<{ latitude: number, longitude: number }> | undefined {
152-
return useAPIResult('/api/matomo', {
157+
return useAPIResult('https://analytics.svc.macrostrat.org', {
153158
date: 'today',
154159
period: 'day',
155160
filter_limit: 10000,
156161
filter_offset: 0,
162+
module: 'API',
163+
format: 'json',
157164
showColumns: 'latitude,longitude',
158165
doNotFetchActions: true,
166+
idSite: '1',
167+
method: 'Live.getLastVisitsDetails',
168+
token_auth: import.meta.env.VITE_MATOMO_API_TOKEN
159169
})
160170
}
161171

162172
function getVisitsToday(): { visits: number, visitors: number } | undefined {
163-
return useAPIResult('/api/matomo', {
173+
return useAPIResult('https://analytics.svc.macrostrat.org', {
164174
method: "Live.getCounters",
165-
idSite: 1,
166-
lastMinutes: 1440
175+
lastMinutes: 1440,
176+
module: 'API',
177+
format: 'json',
178+
idSite: '1',
179+
token_auth: import.meta.env.VITE_MATOMO_API_TOKEN
167180
})?.[0]
168181
}

0 commit comments

Comments
 (0)