File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,33 @@ To locally serve the site at [localhost:8888][], run the following command:
39
39
$ npm run serve
40
40
```
41
41
42
+ ## Setup Google Analytics (GA) and Google Tag Manager (GTM)
43
+
44
+ 1 . ** Google Analytics (GA):**
45
+ - Follow the [ GA setup guide] ( https://support.google.com/analytics/answer/9304153 ) to create your account, property, and data stream.
46
+ - Update ` config.yaml ` with your GA Measurement ID:
47
+
48
+ ``` yaml
49
+ params :
50
+ googleAnalytics : " G-XXXXXXXXXX" # Replace with your GA Measurement ID
51
+ ` ` `
52
+ Verify GA setup using real-time reports to ensure data from your website is being tracked.
53
+
54
+ 2. **Google Tag Manager (GTM):**
55
+ - Follow the [GTM setup guide](https://developers.google.com/tag-platform/tag-manager/web) to create your account and container.
56
+ - Update ` config.yaml` with your GTM ID:
57
+
58
+ ` ` ` yaml
59
+ params:
60
+ gtmID: "GTM-XXXXXXXX" # Replace with your GTM ID
61
+ ` ` `
62
+ Check GTM setup using Preview mode and verify that Tag Assistant displays "Connected" for your website URL.
63
+
64
+ Build the site by setting Hugo environment to production to make sure GA and GTM work.
65
+ ` ` ` console
66
+ $ HUGO_ENV=production npm run serve
67
+ ` ` `
68
+
42
69
# # Site deploys and PR previews
43
70
44
71
If you submit a PR, Netlify will create a [deploy preview][] so that you can
You can’t perform that action at this time.
0 commit comments