@adhawk/react-tracked-link
v1.2.9
Published
A React component for catching and reporting errors
Downloads
54
Readme
@adhawk/react-tracked-link
This package is a wrapper <a>
tags that is compatible Segment.io. Under the
hood, it ensures analytics.track
is called before the browser navigates
away. Similar to analytics.trackLink
, but for React.
Setup
yarn add @adhawk/react-tracked-link
Usage
import { TrackedLink } from "@adhawk/react-tracked-link";
ReactDOM.render(
<TrackedLink
href="/foo/bar"
eventName="Clicked Foo Link"
eventProperties={{ experiment: "v2" }}
/>,
document.querySelector("root"),
);