Remove pageHasVideo GA event property (Fixes #14331) (#14350)

This commit is contained in:
Alex Gibson 2024-03-22 18:09:27 +00:00 коммит произвёл GitHub
Родитель 12063a9f32
Коммит ffbb215064
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 0 добавлений и 28 удалений

Просмотреть файл

@ -16,7 +16,6 @@
var dataLayerCore = {
event: 'core-datalayer-loaded',
pageHasDownload: analytics.pageHasDownload(),
pageHasVideo: analytics.pageHasVideo(),
pageVersion: analytics.getPageVersion(),
releaseWindowVersion: analytics.getLatestFxVersion()
};

Просмотреть файл

@ -32,17 +32,6 @@ if (typeof window.Mozilla.Analytics === 'undefined') {
: 'false';
};
/** Returns whether page has video.
* @param {String} path - URL path name fallback if page ID does not exist.
* @return {String} string.
*/
analytics.pageHasVideo = function () {
if (!isModernBrowser) {
return 'false';
}
return document.querySelector('video') !== null ? 'true' : 'false';
};
/** Returns page version.
* @param {String} path - URL path name fallback if page ID does not exist.
* @return {String} version number from URL.

Просмотреть файл

@ -27,22 +27,6 @@ describe('core-datalayer.js', function () {
});
});
describe('pageHasVideo', function () {
it('will return "true" when HTML5 video is present on page.', function () {
const videoMarkup = '<video id="video-content"></video>';
document.body.insertAdjacentHTML('beforeend', videoMarkup);
expect(Mozilla.Analytics.pageHasVideo()).toBe('true');
const content = document.getElementById('video-content');
content.parentNode.removeChild(content);
});
it('will return "false" when download button is not present on page.', function () {
expect(Mozilla.Analytics.pageHasVideo()).toBe('false');
});
});
describe('getPageVersion', function () {
it('will return the Firefox version number form the URL if present', function () {
expect(