From a3eb8aae96d20ccadb3535c605a6df5d001ac166 Mon Sep 17 00:00:00 2001 From: piano-analytics Date: Fri, 11 Oct 2024 11:25:14 +0200 Subject: [PATCH] 6.15.1 --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/business/privacy/dl-privacy.js | 3 ++- src/config.js | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1652e29..d851290 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## 6.15.1 +### Fixes +- [browser] Fix a specific case when consent is disabled + ## 6.15.0 ### New - [browser] New AV Insights method (`media.playbackKill`) to technically stop a playback session diff --git a/package.json b/package.json index f3a209d..923e255 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "piano-analytics-js", "description": "JavaScript library for Piano Analytics", - "version": "6.15.0", + "version": "6.15.1", "main": "dist/browserless/piano-analytics.cjs.js", "module": "dist/browserless/piano-analytics.esm.js", "browser": "dist/browser/piano-analytics.umd.js", diff --git a/src/business/privacy/dl-privacy.js b/src/business/privacy/dl-privacy.js index 1da3215..f402952 100644 --- a/src/business/privacy/dl-privacy.js +++ b/src/business/privacy/dl-privacy.js @@ -41,7 +41,8 @@ function DlPrivacy(pa) { }; this.isPAConsentDisabled = function () { - return typeof dataLayer.get('consent')['PA'] === 'undefined'; + const _consent = dataLayer.get('consent'); + return !(_consent && _consent['PA']); }; this.init = function () { this.consentItems = getConsentItems(); diff --git a/src/config.js b/src/config.js index 008a66f..999aa16 100644 --- a/src/config.js +++ b/src/config.js @@ -23,7 +23,7 @@ export default { ], 'storageVisitor': 'pa_vid', 'storageUser': 'pa_user', - 'version': '6.15.0', + 'version': '6.15.1', 'minHeartbeat': 5, 'minBufferingHeartbeat': 1, 'queueVarName': '_paq',