Skip to content

[gatsby-plugin-google-analytics] Pass event category, label, and action to the <OutboundLink> component #20337

@KristinaKoeva

Description

@KristinaKoeva

Summary

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:[email protected]"
    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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssue that doesn't require previous experience with Gatsbyhelp wantedIssue with a clear description that the community can help with.stale?Issue that may be closed soon due to the original author not responding any more.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions