flpvsk / gatsby-plugin-gtag

Gatsby plugin to add Google Analytics gtag.js (replacement for analytics.js) to a site.
MIT License
28 stars 12 forks source link

Add OutboundLink module #6

Closed ascasson closed 5 years ago

ascasson commented 5 years ago

A convenient thing to have is the OutboundLink module from the original google analytics plugin: https://github.com/gatsbyjs/gatsby/blob/45ec012f03a533c28b4ebf3b944f2342a7bd86f2/packages/gatsby-plugin-google-analytics/src/index.js

Would you be willing to accept this feature adapted to gtag?

flpvsk commented 5 years ago

Hey @ascasson,

Would you be willing to accept this feature adapted to gtag?

Yes, of course!

Please note the differences in the API: https://developers.google.com/analytics/devguides/collection/gtagjs/events

ascasson commented 5 years ago

@flpvsk Cool. I created an experimental package yesterday. I'll see how it's functioning and then add the changes to a PR then remove that plugin.

ascasson commented 5 years ago

@flpvsk Here's the package: https://www.npmjs.com/package/gatsby-plugin-gtag-outbound I wasn't expecting people to find it as I was just using it for an emergency fix for a client, but alas they have. Late night...dumb naming. With that, can you ignore the commit history (with changes to fit your versioning) or want a clean slate? I can deprecate the version and tell people to go to your package as well. Whatever you like I'm happy to accommodate! Let me know 👍

ascasson commented 5 years ago

See PR #7 and we'll go from there. I can deprecate after.

flpvsk commented 5 years ago

Published as v1.0.6 Thanks @ascasson!

ascasson commented 5 years ago

@flpvsk Feel free to give me a shout if you ever want some help with this package. Got so used to looking at it, happy to contribute/maintain if you don't just want to do it solo. Contact info in my profile 👍

flpvsk commented 5 years ago

@ascasson 👍 will do! Thanks again!