(type, config)
| 8 | }, |
| 9 | |
| 10 | contentFor(type, config) { |
| 11 | const id = config.googleAnalyticsId; |
| 12 | |
| 13 | if (type === 'head' && id) { |
| 14 | return ` |
| 15 | <script async src="https://www.googletagmanager.com/gtag/js?id=${id}"></script> |
| 16 | <script> |
| 17 | window.dataLayer = window.dataLayer || []; |
| 18 | function gtag(){dataLayer.push(arguments);} |
| 19 | gtag('js', new Date()); |
| 20 | gtag('config', '${id}'); |
| 21 | </script> |
| 22 | `; |
| 23 | } |
| 24 | |
| 25 | return ''; |
| 26 | }, |
| 27 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected