File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from 'react'
22import { Link } from 'gatsby'
33import PropTypes from 'prop-types'
4- import { OutboundLink } from "gatsby-plugin-google-analytics"
4+ import { trackCustomEvent } from "gatsby-plugin-google-analytics"
55import {
66 NavWrap ,
77 StyledNav ,
@@ -68,14 +68,21 @@ const Nav = ({ navOpen, setNavOpen }) => {
6868 < div >
6969 < p > Join the CodeHelp Discord server?</ p >
7070 < div >
71- < OutboundLink
71+ < a
7272 href = "https://discord.gg/KntFa9p"
7373 rel = "noreferrer noopener"
7474 target = "_blank"
7575 title = "Join CodeHelp Discord!"
76+ onClick = { ( ) => {
77+ trackCustomEvent ( {
78+ category : "Discord Link" ,
79+ action : "Click" ,
80+ label : "Navigation" ,
81+ } )
82+ } }
7683 >
7784 Yes
78- </ OutboundLink >
85+ </ a >
7986 < button onClick = { ( ) => close ( ) } tabIndex = "0" >
8087 No
8188 </ button >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Layout from '../components/Layout'
44import Seo from '../components/Seo'
55import { StyledHome } from '../assets/styles/pages/Index.styles'
66import discordIcon from '../assets/images/icon-discord.svg'
7- import { OutboundLink } from "gatsby-plugin-google-analytics"
7+ import { trackCustomEvent } from "gatsby-plugin-google-analytics"
88
99const IndexPage = ( ) => (
1010 < Layout >
@@ -28,18 +28,25 @@ const IndexPage = () => (
2828 fun, helpful group where people can get the development and programming
2929 support they need.
3030 </ p >
31- < OutboundLink
31+ < a
3232 className = "button"
3333 href = "https://discord.gg/KntFa9p"
3434 rel = "noreferrer noopener"
3535 target = "_blank"
3636 title = "Join CodeHelp Discord!"
37+ onClick = { ( ) => {
38+ trackCustomEvent ( {
39+ category : "Discord Link" ,
40+ action : "Click" ,
41+ label : "Home" ,
42+ } )
43+ } }
3744 >
3845 < span >
3946 < img alt = "Discord Icon" src = { discordIcon } />
4047 Join CodeHelp
4148 </ span >
42- </ OutboundLink >
49+ </ a >
4350 </ StyledHome >
4451 </ Layout >
4552)
You can’t perform that action at this time.
0 commit comments