Skip to content

Commit

Permalink
fix: tracking matomo
Browse files Browse the repository at this point in the history
  • Loading branch information
desoindx committed Dec 10, 2024
1 parent cce95dd commit ce3deb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/matomo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const track = (category: string, action: string, name: string, ignoreReferrer?: boolean) => {
if (window && window.please) {
const url =
document.location.ancestorOrigins.length > 0
document.location.ancestorOrigins && document.location.ancestorOrigins.length > 0
? document.location.ancestorOrigins[0]
: document.location?.origin || document.referrer
if (!ignoreReferrer && url && !url.startsWith('https://impactco2.fr')) {
Expand Down

0 comments on commit ce3deb9

Please sign in to comment.