diff --git a/src/lib/analytics.svelte b/src/lib/analytics.svelte
index 2b7def2e..b583fddb 100644
--- a/src/lib/analytics.svelte
+++ b/src/lib/analytics.svelte
@@ -1,8 +1,10 @@
@@ -26,14 +24,4 @@ if (typeof window !== 'undefined') {
async
src="https://www.googletagmanager.com/gtag/js?id={site_google_tracking_id}">
-
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 227dabc9..70eb5aa8 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -191,16 +191,26 @@ if ($ae_loc.site_cfg_json.slct__sponsorship_cfg_id) {
// Updated 2024-11-21
if ($ae_loc.site_access_key || $ae_loc.site_domain_access_key) {
- console.log(`We need to do a current check against the allow_access value.`);
+ if (log_lvl > 1) {
+ console.log(`We need to do a current check against the allow_access value. site key: ${$ae_loc.site_access_key}, domain key: ${$ae_loc.site_domain_access_key}`);
+ }
+ // $ae_loc.allow_access is set to they key if passed in the URL. It is set to true if they are just "trusted".
if ($ae_loc.site_access_key === $ae_loc.allow_access || $ae_loc.site_domain_access_key === $ae_loc.allow_access) {
- console.log(`PASS: The access key was checked earlier and we just now checked the key.`);
+ if (log_lvl > 1) {
+ console.log(`PASS: The allow_access was checked earlier and just now checked against the site or domain key.`);
+ }
} else {
- console.log(`FAIL: The access key was checked earlier, but just now failed.`);
+ // console.log(`FAIL: The access key was checked earlier, but just now failed. Checking if they are trusted...`);
if ($ae_loc.trusted_access) {
- console.log(`FAIL: The access key was checked earlier and failed, but we have trusted access.`);
+ if (log_lvl > 1) {
+ console.log(`PASS: The access key was checked and failed, but we have trusted access.`);
+ }
$ae_loc.allow_access = true;
} else {
+ if (log_lvl) {
+ console.log(`FAIL: The site and domain access key was checked and failed, and we do not have trusted access.`);
+ }
$ae_loc.allow_access = false;
}
}