You've already forked AstralRinth
forked from didirus/AstralRinth
Fix issues with privacy settings
This commit is contained in:
@@ -9,6 +9,9 @@ function isAnalyticsOn(ctx) {
|
||||
// Rely on the client
|
||||
cookies = document.cookie;
|
||||
}
|
||||
|
||||
if(!cookies) return true;
|
||||
|
||||
let processed = {}
|
||||
cookies.split(';').forEach((e) => {
|
||||
let val = e.trim().split('=');
|
||||
@@ -27,14 +30,13 @@ export default async function (ctx, inject) {
|
||||
const tag = config.tracking_code ?? '<%= options.tracking_code %>';
|
||||
const enabled = config.enabled ?? <%= options.enabled || false %>;
|
||||
// Check if the parameters are not changed by runtime config:
|
||||
|
||||
|
||||
|
||||
|
||||
const UNAMI_LIB_TAG_ID = '<%= options.UNAMI_LIB_TAG_ID %>';
|
||||
|
||||
|
||||
if (!enabled) {
|
||||
console.log("Analytics are not enabled.")
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
function isPersonalizedAdsOn(ctx) {
|
||||
let cookies = null
|
||||
let cookies = []
|
||||
if (ctx.req != null) {
|
||||
//Server side rendering
|
||||
cookies = ctx.req.headers.cookie;
|
||||
@@ -9,6 +9,9 @@ function isPersonalizedAdsOn(ctx) {
|
||||
// Rely on the client
|
||||
cookies = document.cookie;
|
||||
}
|
||||
|
||||
if(!cookies) return true;
|
||||
|
||||
let processed = {}
|
||||
cookies.split(';').forEach((e) => {
|
||||
let val = e.trim().split('=')
|
||||
@@ -102,7 +105,7 @@ export default async function (ctx, inject) {
|
||||
};
|
||||
injectScript(gptInitScript);
|
||||
|
||||
|
||||
|
||||
const component = require('./component.js');
|
||||
Vue.component('<%= options.componentName %>', component.default || component);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user