Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

417 B
Raw Blame
import type { Component } from 'solid-js';
import { useCurrentMatches } from '@solidjs/router';
import { createEffect, on } from 'solid-js';
import { trackingServices } from '../tracking.services';

export const PageViewTracker: Component = () => {
  const matches = useCurrentMatches();

  createEffect(
    on(matches, () => {
      trackingServices.capture({ event: '$pageview' });
    }),
  );

  return null;
};