You've already forked AstralRinth
forked from didirus/AstralRinth
Change ads provider, and add consent system for advertising (#155)
* Add GAM integration & base for GPDR consent * Moved consent to a specific page. * Added functionality to the privacy page, and desactivate tracking if consent is not given. * Added GeoEdge support, and fixed auth issues * Fix actions issue * Fix actions issue, attempt 2 * Added a module for analytics with consent support. * Remove unnecessary function * Add support for runtime config
This commit is contained in:
@@ -61,14 +61,7 @@ export default {
|
||||
'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap',
|
||||
},
|
||||
],
|
||||
script: [
|
||||
{
|
||||
src: 'https://analytics.modrinth.com/umami.js',
|
||||
'data-website-id': 'c37613de-245d-4767-90e7-ba7980a4f1a2',
|
||||
async: true,
|
||||
defer: true,
|
||||
},
|
||||
],
|
||||
script: [],
|
||||
},
|
||||
|
||||
vue: {
|
||||
@@ -78,7 +71,7 @@ export default {
|
||||
},
|
||||
},
|
||||
router: {
|
||||
middleware: 'auth',
|
||||
middleware: ['auth', 'ads_tracking'],
|
||||
},
|
||||
/*
|
||||
** Global CSS
|
||||
@@ -119,9 +112,20 @@ export default {
|
||||
'@nuxtjs/robots',
|
||||
'@nuxtjs/sitemap',
|
||||
'@nuxtjs/style-resources',
|
||||
'@nuxtjs/google-adsense',
|
||||
'cookie-universal-nuxt',
|
||||
'~/modules/gpt-ads',
|
||||
'~/modules/analytics',
|
||||
],
|
||||
ads: {
|
||||
// Module options
|
||||
ghostMode: true,
|
||||
geoEdgeId: '',
|
||||
},
|
||||
analytics: {
|
||||
enabled: false,
|
||||
script_url: '',
|
||||
tracking_code: '',
|
||||
},
|
||||
robots: {
|
||||
Sitemap: 'https://modrinth.com/sitemap.xml',
|
||||
},
|
||||
@@ -139,9 +143,6 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
'google-adsense': {
|
||||
id: 'ca-pub-4615302805870170',
|
||||
},
|
||||
dayjs: {
|
||||
locales: ['en'],
|
||||
defaultLocale: 'en',
|
||||
@@ -170,4 +171,16 @@ export default {
|
||||
env: {
|
||||
version: process.env.VERSION_ID || 'unknown',
|
||||
},
|
||||
publicRuntimeConfig: {
|
||||
ads: {
|
||||
ghostMode: process.env.ENABLE_ADS == null,
|
||||
GeoEdgeId: process.env.GEOEDGE_ID,
|
||||
networkCode: process.env.GAM_ID,
|
||||
},
|
||||
analytics: {
|
||||
enabled: process.env.ENABLE_ANALYTICS,
|
||||
script_url: process.env.ANALYTICS_URL,
|
||||
tracking_code: process.env.ANALYTICS_ID,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user