1.16.26 • Published 3 days ago

@blocklet/tracker v1.16.26

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 days ago

Blocklet Tracker

A library to facilitate blocklet tracking, sending tracking data to a backend, can only be used in browser.

Usage

Import the library in your blocklet's index.jsx file.

import '@blocklet/tracker';

Then you can use the window.tracker object to send tracking data to a backend.

import { useEffect } from 'react';
import { useLocation } from 'react-router-dom';

export default function App() {

  const location = useLocation();

  useEffect(() => {
    if (window.tracker && typeof window.tracker.pageView === 'function') {
      window.tracker.pageView(`${location.pathname}${location.search}`);
    }
  }, [location]);
}
1.16.26

6 days ago

1.16.25

1 month ago

1.16.24

2 months ago

1.16.23

3 months ago

1.16.22

4 months ago

1.16.21

4 months ago

1.16.20

5 months ago

1.16.19

5 months ago

1.16.14

9 months ago

1.16.13

10 months ago

1.16.18

6 months ago

1.16.17

6 months ago

1.16.16

7 months ago

1.16.15

8 months ago