Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions advanced/custom/js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ description: 'Add JavaScript functionality globally'

Custom JS allows you to add custom executable code globally. It is the equivalent of adding a `<script>` tag with JS code into every page.

## Adding script.js
## Adding Custom JavaScript

For example, you can add the following `script.js` file to enable [Google Analytics](https://marketingplatform.google.com/about/analytics) across the entire documentation.
Any `.js` file inside the content directory of your docs will be included in every documentation page. For example, you can add the following `ga.js` file to enable [Google Analytics](https://marketingplatform.google.com/about/analytics) across the entire documentation.

```js
window.dataLayer = window.dataLayer || [];
Expand Down