[gatsby-plugin-google-analytics] Pass event category, label, and action to the <OutboundLink> component
See original GitHub issueSummary
Be able to pass event category, label, and action as properties to the <OutboundLink/>
component provided by gatsby-plugin-google-analytics
Basic example
<OutboundLink href="mailto:careers@site.com"
eventCategory="careers"
eventAction="apply"
eventLabel="office_assistance">
<Button>Apply now</Button>
</OutboundLink>
Motivation
It would be great if we can have some control over the category, action, and label of each event so that we can make Event flows based on some of those event properties.
I would be happy to contribute if you guys think that this addition would make sense.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
gatsby-plugin-google-analytics - npm
To make it easy to track clicks on outbound links in Google Analytics, the plugin provides a component. To use it, simply import...
Read more >Gatsbyjs + Google analytics - tracking custom events?
gatsby-plugin-google-analytics inserts GA into the end of the body of your site automatically, so basic pageviews are easily tracked that way.
Read more >How to set up event tracking in Google Analytics
Each event is made up of four components that you define. These are category, action, label, and value. Category. A category is an...
Read more >[UA→GA4] Send events to both your UA and GA4 properties
Event action becomes an event name in the Google Analytics 4 property. Event category, label, and value become event parameters in the Google...
Read more >react-ga - npm.io
When included as a script tag, a variable ReactGA is exposed in the ... ReactGA.event({ category: 'Editing', action: 'Deleted Component', label: 'Game ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for the issue!
That would be a great feature indeed! Would you like to make a PR to fix that? You would need to change OutboundLink component to take category/action/label from the props.
Thank you! 💜
Fixed by #20570