Skip to content

Commit

Permalink
clean up plausible URL
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Oct 8, 2024
1 parent eb2c3f1 commit ed41273
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/api-plugins/plausible/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export function load(app) {
return subParts.length === 3 && !isNaN(subParts[0]) && !isNaN(subParts[1]);
});
const interestingPart = parts.slice(versionIndex + 1).join("/");
if (interestingPart.startsWith("/"))
interestingPart = interestingPart.slice(1);
const engineVersion = parts[versionIndex];
console.log("Plausible PageView", interestingPart, engineVersion);
plausible('pageview', {
Expand Down

0 comments on commit ed41273

Please sign in to comment.