Skip to content

Commit

Permalink
Merge branch 'develop' into es-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
trusktr committed Jul 2, 2023
2 parents eb3706c + 85c3c2e commit 1679670
Show file tree
Hide file tree
Showing 6 changed files with 538 additions and 442 deletions.
1 change: 1 addition & 0 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async function buildAllPlugin() {
var plugins = [
{name: 'search', input: 'search/index.js'},
{name: 'ga', input: 'ga.js'},
{name: 'gtag', input: 'gtag.js'},
{name: 'matomo', input: 'matomo.js'},
{name: 'emoji', input: 'emoji.js'},
{name: 'external-script', input: 'external-script.js'},
Expand Down
27 changes: 27 additions & 0 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ This plugin ignores diacritical marks when performing a full text search (e.g.,

## Google Analytics

> Google's Universal Analytics service will no longer process new data in standard properties beginning July 1, 2023. Prepare now by setting up and switching over to a Google Analytics 4 property and docsify's gtag.js plugin.
Install the plugin and configure the track id.

```html
Expand All @@ -91,6 +93,31 @@ Configure by `data-ga`.
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/ga.min.js"></script>
```

## Google Analytics 4 (GA4)

Install the plugin and configure the track id.

```html
<script>
// Single ID
window.$docsify = {
gtag: 'UA-XXXXX-Y',
};
// Multiple IDs
window.$docsify = {
gtag: [
'G-XXXXXXXX', // Google Analytics 4 (GA4)
'UA-XXXXXXXX', // Google Universal Analytics (GA3)
'AW-XXXXXXXX', // Google Ads
'DC-XXXXXXXX', // Floodlight
],
};
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/gtag.min.js"></script>
```

## Emoji

Renders a larger collection of emoji shorthand codes. Without this plugin, Docsify is able to render only a limited number of emoji shorthand codes.
Expand Down
Loading

0 comments on commit 1679670

Please sign in to comment.