Skip to content

Commit

Permalink
Document new component <OutboundLink> (#4787)
Browse files Browse the repository at this point in the history
* Add OutBoundLink component to gatsby-plugin-google-analytics

* Track outbound links on gatsbyjs.org

* Fix link errors + handle other types of clicks

* Use named arguments

* Document new component <OutboundLink>
  • Loading branch information
KyleAMathews authored Apr 1, 2018
1 parent c63b0ad commit 92e54dd
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion packages/gatsby-plugin-google-analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,29 @@ module.exports = {
},
},
],
};
}
```

## `<OutboundLink>` component

To make it easy to track clicks on outbound links in Google Analytics,
the plugin provides a component.

To use it, simply import it and use it like you would the `<a>` element e.g.

```jsx
import React
import { Outboundink } from 'gatsby-plugin-google-analytics'

export default () => {
<div>
<Outboundink
href="https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/"
>
Visit the Google Analytics plugin page!
</Outboundink>
</div>
}
```

## The "anonymize" option
Expand Down

0 comments on commit 92e54dd

Please sign in to comment.