-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
159 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
} | ||
}, | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true, | ||
"jest": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
/gatsby-browser.js | ||
/gatsby-ssr.js | ||
/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "gatsby-plugin-google-analytics", | ||
"description": "Gatsby plugin to add google analytics onto a site", | ||
"version": "1.0.25", | ||
"version": "1.0.27", | ||
"author": "Kyle Mathews <[email protected]>", | ||
"bugs": { | ||
"url": "https://github.com/gatsbyjs/gatsby/issues" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
|
||
function OutboundLink(props) { | ||
return ( | ||
<a | ||
{...props} | ||
onClick={e => { | ||
let redirect = true | ||
if ( | ||
e.button !== 0 || | ||
e.altKey || | ||
e.ctrlKey || | ||
e.metaKey || | ||
e.shiftKey || | ||
e.defaultPrevented | ||
) { | ||
redirect = false | ||
} | ||
if (props.target && props.target.toLowerCase() !== `_self`) { | ||
redirect = false | ||
} | ||
if (window.ga) { | ||
window.ga(`send`, `event`, { | ||
eventCategory: `Outbound Link`, | ||
eventAction: `click`, | ||
eventLabel: props.href, | ||
transport: redirect ? `beacon` : ``, | ||
hitCallback: function() { | ||
if (redirect) { | ||
document.location = props.href | ||
} | ||
}, | ||
}) | ||
} else { | ||
if (redirect) { | ||
document.location = props.href | ||
} | ||
} | ||
|
||
return false | ||
}} | ||
/> | ||
) | ||
} | ||
|
||
OutboundLink.propTypes = { | ||
href: PropTypes.string, | ||
target: PropTypes.string, | ||
} | ||
|
||
export { OutboundLink } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "gatsby-plugin-react-helmet", | ||
"description": "Provides drop-in support for server rendering data added with react-helmet", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"author": "Kyle Mathews <[email protected]>", | ||
"bugs": { | ||
"url": "https://github.com/gatsbyjs/gatsby/issues" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters