Skip to content

Commit

Permalink
feat: loadingStrategy for gtag.js external script
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Apr 3, 2023
1 parent 008020e commit ae590f4
Show file tree
Hide file tree
Showing 5 changed files with 512 additions and 515 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ With this setup, you can omit the `gtag` key in your Nuxt configuration if you o

## Module Options

| Option | Type | Description | Default |
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `id` | `string` | The Google Analytics measurement ID. | `undefined` |
| `config` | `Record<string, any>` | The [configuration parameters](https://developers.google.com/analytics/devguides/collection/ga4/reference/config) to be passed to `gtag.js` on initialization. | `{}` |
| `id` | `string` | `undefined` | The Google Analytics measurement ID. |
| `config` | `Record<string, any>` | `{}` | The [configuration parameters](https://developers.google.com/analytics/devguides/collection/ga4/reference/config) to be passed to `gtag.js` on initialization. |
| `loadingStrategy` | `'async' \| 'defer'` | `'defer'` | The loading strategy to be used for the `gtag.js` script. |

## Composables

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@
"prepare": "nuxi prepare playground"
},
"dependencies": {
"@nuxt/kit": "^3.3.2",
"@nuxt/kit": "^3.3.3",
"defu": "^6.1.2",
"pathe": "^1.1.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.38.0",
"@antfu/eslint-config": "^0.38.3",
"@nuxt/module-builder": "^0.2.1",
"@nuxt/schema": "^3.3.2",
"@nuxt/schema": "^3.3.3",
"@types/node": "^18.15.11",
"bumpp": "^9.1.0",
"eslint": "^8.37.0",
"nuxt": "^3.3.2",
"nuxt": "^3.3.3",
"nuxt-gtag": "workspace:*",
"typescript": "^5.0.2",
"typescript": "^5.0.3",
"vue-tsc": "^1.2.0"
}
}
Loading

0 comments on commit ae590f4

Please sign in to comment.