mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 12:27:17 +00:00
Make googleAnalytics config optional
This commit is contained in:
@@ -95,7 +95,7 @@ const Blog = () => {
|
||||
key={index}
|
||||
onClick={() => {
|
||||
try {
|
||||
if (config.googleAnalytics.id) {
|
||||
if (config.googleAnalytics?.id) {
|
||||
ga.event({
|
||||
action: "Click Blog Post",
|
||||
params: {
|
||||
|
||||
@@ -14,12 +14,12 @@ const MetaTags = (props) => {
|
||||
props.profile && (
|
||||
<Helmet>
|
||||
{
|
||||
config.googleAnalytics.id && (
|
||||
config.googleAnalytics?.id && (
|
||||
<script async src={`https://www.googletagmanager.com/gtag/js?id=${config.googleAnalytics.id}`}></script>
|
||||
)
|
||||
}
|
||||
{
|
||||
config.googleAnalytics.id && (
|
||||
config.googleAnalytics?.id && (
|
||||
<script>
|
||||
{
|
||||
`
|
||||
|
||||
@@ -57,7 +57,7 @@ const Project = (props) => {
|
||||
key={index}
|
||||
onClick={() => {
|
||||
try {
|
||||
if (config.googleAnalytics.id) {
|
||||
if (config.googleAnalytics?.id) {
|
||||
ga.event({
|
||||
action: "Click project",
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user