Skip to content

Commit ce602dd

Browse files
committed
Updated documentation
1 parent f65f467 commit ce602dd

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

docs/setup/setting-up-site-analytics.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ following lines to `mkdocs.yml`:
5555

5656
1. Go to your Google Analytics __admin settings__
5757
2. Select the property for the respective tracking code
58-
3. Select the __Data Streams__ tab and click the corresponding URL
59-
4. Click the gear icon within the __Enhanced measurement__ section
60-
5. Ensure that __Site search__ is enabled
58+
3. Select the __data streams__ tab and click the corresponding URL
59+
4. Click the gear icon within the __enhanced measurement__ section
60+
5. Ensure that __site search__ is enabled
6161

6262
=== ":material-google-analytics: Universal Analytics"
6363

@@ -261,6 +261,27 @@ e.g. your privacy policy:
261261
[custom cookies]: #custom-cookies
262262
[extra.consent enabled]: ../assets/screenshots/consent.png
263263

264+
## Usage
265+
266+
### Hiding the feedback widget
267+
268+
When [Metadata] is enabled, the [feedback widget][extra.analytics.feedback] can
269+
be hidden for a document with custom front matter. Add the following lines at
270+
the top of a Markdown file:
271+
272+
``` bash
273+
---
274+
hide:
275+
- feedback
276+
---
277+
278+
# Document title
279+
...
280+
```
281+
282+
[Metadata]: extensions/python-markdown.md#metadata
283+
284+
264285
## Customization
265286

266287
### Custom site analytics

src/partials/integrations/analytics/google.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@
4545
if (document.forms.search) {
4646
var query = document.forms.search.query
4747
query.addEventListener("blur", function() {
48-
if (this.value) {
49-
gtag("event", "search", {search_term: this.value})
50-
}
48+
if (this.value)
49+
gtag("event", "search", { search_term: this.value })
5150
})
5251
}
5352

0 commit comments

Comments
 (0)