Skip to content

Commit e81b246

Browse files
maciekmaciejpieh
authored andcommitted
feat(gatsby-plugin-google-analytics): Pass event object to the user's onClick callback in OutboundLink (#11340)
1 parent 3beb891 commit e81b246

File tree

1 file changed

+1
-1
lines changed
  • packages/gatsby-plugin-google-analytics/src

1 file changed

+1
-1
lines changed

packages/gatsby-plugin-google-analytics/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function OutboundLink(props) {
77
{...props}
88
onClick={e => {
99
if (typeof props.onClick === `function`) {
10-
props.onClick()
10+
props.onClick(e)
1111
}
1212
let redirect = true
1313
if (

0 commit comments

Comments
 (0)