mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-08-03 19:17:07 -04:00
25 lines
709 B
TypeScript
25 lines
709 B
TypeScript
export default defineNuxtPlugin(() => {
|
|
const config = useConfig();
|
|
if (!config.ads?.enabled || import.meta.env?.APP_ENV !== 'production') {
|
|
return;
|
|
}
|
|
|
|
useHead({
|
|
script: [
|
|
{
|
|
src: 'https://www.googletagmanager.com/gtag/js?id=G-TDJEP12Q3M',
|
|
async: true,
|
|
},
|
|
{
|
|
textContent: `
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
gtag('config', 'G-TDJEP12Q3M');
|
|
`,
|
|
type: 'text/javascript',
|
|
},
|
|
],
|
|
});
|
|
});
|