这是我在 gatsby-config.js 中的代码
module.exports = {
siteMetadata: {
title: `title`,
description: ``,
author: `@Wavii`,
},
plugins: [
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: "UA-XXXXXX-XX",
// Defines where to place the tracking script - `true` in the head and `false` in the body
head: true,
},
},
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
Run Code Online (Sandbox Code Playgroud)
不知道为什么它不起作用,它甚至没有在我的源代码上显示任何谷歌分析。
提前致谢。