Skip to content

Commit

Permalink
Release 1.24.7
Browse files Browse the repository at this point in the history
  • Loading branch information
shengyonggen committed Dec 15, 2022
1 parent 8d14838 commit 8070b95
Show file tree
Hide file tree
Showing 24 changed files with 141 additions and 131 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## 1.24.7 (2022-12-15)
1. 修复
- 修复部分场景下属性 `$first_referrer_host` 采集有值但是 `$first_referrer` 为空的问题
- 修复 `url` 链接中有中文导致热力图无法显示数据的问题
- 修复特殊场景下 `$pageview` 采集到了 `utm` 参数,但是流量来源类型是直接流量的问题

## 1.24.6 (2022-12-7)
1. 新增
- 支持 `List` 列表元素非字符串类型
2. 修复
- 修复 `isURLAPIWorking` 引起的黑链问题

## 1.24.5 (2022-11-22)
1. 新增
Expand Down
10 changes: 5 additions & 5 deletions core/sensorsdata.amd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/sensorsdata.es6.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions core/sensorsdata.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/sensorsdata.mtp.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/mtp/sensorsdata.mtp.js

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions dist/sat/sensorsdata-sat.amd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sat/sensorsdata-sat.es6.js

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions dist/sat/sensorsdata-sat.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/web/sensorsdata.amd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/web/sensorsdata.es6.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/web/sensorsdata.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion heatmap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sa-sdk-javascript",
"version": "1.24.6",
"version": "1.24.7",
"description": "official sensorsdata javascript sdk",
"main": "dist/web/sensorsdata.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions product/heatmap.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -9413,7 +9413,7 @@
method: 'setUrl',
params: {
request_type: sessionStorage.getItem('sensors_heatmap_type') || '1',
url: location.href
url: _.getUrl()
}
},
sd.para.web_url
Expand Down Expand Up @@ -9466,7 +9466,7 @@

window.sa_jssdk_heatmap_render = function(se, data, type, url) {
sd = se;
sd.heatmap_version = '1.24.6';
sd.heatmap_version = '1.24.7';
_ = sd._;
_.querySelectorAll = function(val) {
if (typeof val !== 'string') {
Expand Down
39 changes: 20 additions & 19 deletions product/sensorsdata.amd.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -2232,19 +2232,6 @@
}
}

function getQueryParam(url, key) {
key = key.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
url = _decodeURIComponent(url);
var regexS = '[\\?&]' + key + '=([^&#]*)',
regex = new RegExp(regexS),
results = regex.exec(url);
if (results === null || (results && typeof results[1] !== 'string' && results[1].length)) {
return '';
} else {
return _decodeURIComponent(results[1]);
}
}


function getQueryParamsFromUrl(url) {
var result = {};
Expand All @@ -2256,6 +2243,21 @@
return result;
}

function getQueryParam(url, key) {
var urlParts = _URL(url);
var result = urlParts.searchParams.get(key) || '';

if (!result) {
var hash = urlParts.hash;
if (hash) {
var results = getQueryParamsFromUrl(hash);
result = results[key] || '';
}
}

return result;
}

function mediaQueriesSupported() {
return typeof window.matchMedia != 'undefined' || typeof window.msMatchMedia != 'undefined';
}
Expand Down Expand Up @@ -3069,7 +3071,7 @@
}

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
var sdkversion_placeholder = '1.24.6';
var sdkversion_placeholder = '1.24.7';
var domain_test_key = 'sensorsdata_domain_test';

var IDENTITY_KEY = {
Expand Down Expand Up @@ -3764,9 +3766,6 @@
var isNotProfileType = !data.type || data.type.slice(0, 7) !== 'profile';
var defaultHost = '取值异常';
if (isObject(data.properties)) {
if (data.properties.$first_referrer) {
data.properties.$first_referrer_host = getHostname(data.properties.$first_referrer, defaultHost);
}
if (isNotProfileType) {
if ('$referrer' in data.properties) {
data.properties.$referrer_host = data.properties.$referrer === '' ? '' : getHostname(data.properties.$referrer, defaultHost);
Expand Down Expand Up @@ -5925,10 +5924,12 @@
eqidObj['$search_keyword_id_hash'] = hashCode53(eqidObj['$search_keyword_id']);
}

var referrer = getReferrer(null, fullReferrer);
setOnceProfileFn(
extend({
$first_visit_time: new Date(),
$first_referrer: getReferrer(null, fullReferrer),
$first_referrer: referrer,
$first_referrer_host: referrer ? getHostname(referrer, '取值异常') : '',
$first_browser_language: isString(navigator.language) ? navigator.language.toLowerCase() : '取值异常',
$first_browser_charset: isString(document.charset) ? document.charset.toUpperCase() : '取值异常',
$first_traffic_source_type: getSourceFromReferrer(),
Expand Down Expand Up @@ -8101,7 +8102,7 @@
source: 'sa-web-sdk',
type: 'v-is-vtrack',
data: {
sdkversion: '1.24.6'
sdkversion: '1.24.7'
}
},
'*'
Expand Down
39 changes: 20 additions & 19 deletions product/sensorsdata.es6.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -2226,19 +2226,6 @@ function getIOSVersion() {
}
}

function getQueryParam(url, key) {
key = key.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
url = _decodeURIComponent(url);
var regexS = '[\\?&]' + key + '=([^&#]*)',
regex = new RegExp(regexS),
results = regex.exec(url);
if (results === null || (results && typeof results[1] !== 'string' && results[1].length)) {
return '';
} else {
return _decodeURIComponent(results[1]);
}
}


function getQueryParamsFromUrl(url) {
var result = {};
Expand All @@ -2250,6 +2237,21 @@ function getQueryParamsFromUrl(url) {
return result;
}

function getQueryParam(url, key) {
var urlParts = _URL(url);
var result = urlParts.searchParams.get(key) || '';

if (!result) {
var hash = urlParts.hash;
if (hash) {
var results = getQueryParamsFromUrl(hash);
result = results[key] || '';
}
}

return result;
}

function mediaQueriesSupported() {
return typeof window.matchMedia != 'undefined' || typeof window.msMatchMedia != 'undefined';
}
Expand Down Expand Up @@ -3063,7 +3065,7 @@ function encrypt(v) {
}

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
var sdkversion_placeholder = '1.24.6';
var sdkversion_placeholder = '1.24.7';
var domain_test_key = 'sensorsdata_domain_test';

var IDENTITY_KEY = {
Expand Down Expand Up @@ -3758,9 +3760,6 @@ function addReferrerHost(data) {
var isNotProfileType = !data.type || data.type.slice(0, 7) !== 'profile';
var defaultHost = '取值异常';
if (isObject(data.properties)) {
if (data.properties.$first_referrer) {
data.properties.$first_referrer_host = getHostname(data.properties.$first_referrer, defaultHost);
}
if (isNotProfileType) {
if ('$referrer' in data.properties) {
data.properties.$referrer_host = data.properties.$referrer === '' ? '' : getHostname(data.properties.$referrer, defaultHost);
Expand Down Expand Up @@ -5919,10 +5918,12 @@ function sendFirstProfile(setOnceProfileFn, fullReferrer, is_set_profile) {
eqidObj['$search_keyword_id_hash'] = hashCode53(eqidObj['$search_keyword_id']);
}

var referrer = getReferrer(null, fullReferrer);
setOnceProfileFn(
extend({
$first_visit_time: new Date(),
$first_referrer: getReferrer(null, fullReferrer),
$first_referrer: referrer,
$first_referrer_host: referrer ? getHostname(referrer, '取值异常') : '',
$first_browser_language: isString(navigator.language) ? navigator.language.toLowerCase() : '取值异常',
$first_browser_charset: isString(document.charset) ? document.charset.toUpperCase() : '取值异常',
$first_traffic_source_type: getSourceFromReferrer(),
Expand Down Expand Up @@ -8095,7 +8096,7 @@ var vtrackMode = {
source: 'sa-web-sdk',
type: 'v-is-vtrack',
data: {
sdkversion: '1.24.6'
sdkversion: '1.24.7'
}
},
'*'
Expand Down
39 changes: 20 additions & 19 deletions product/sensorsdata.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -2234,19 +2234,6 @@
}
}

function getQueryParam(url, key) {
key = key.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
url = _decodeURIComponent(url);
var regexS = '[\\?&]' + key + '=([^&#]*)',
regex = new RegExp(regexS),
results = regex.exec(url);
if (results === null || (results && typeof results[1] !== 'string' && results[1].length)) {
return '';
} else {
return _decodeURIComponent(results[1]);
}
}


function getQueryParamsFromUrl(url) {
var result = {};
Expand All @@ -2258,6 +2245,21 @@
return result;
}

function getQueryParam(url, key) {
var urlParts = _URL(url);
var result = urlParts.searchParams.get(key) || '';

if (!result) {
var hash = urlParts.hash;
if (hash) {
var results = getQueryParamsFromUrl(hash);
result = results[key] || '';
}
}

return result;
}

function mediaQueriesSupported() {
return typeof window.matchMedia != 'undefined' || typeof window.msMatchMedia != 'undefined';
}
Expand Down Expand Up @@ -3071,7 +3073,7 @@
}

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
var sdkversion_placeholder = '1.24.6';
var sdkversion_placeholder = '1.24.7';
var domain_test_key = 'sensorsdata_domain_test';

var IDENTITY_KEY = {
Expand Down Expand Up @@ -3766,9 +3768,6 @@
var isNotProfileType = !data.type || data.type.slice(0, 7) !== 'profile';
var defaultHost = '取值异常';
if (isObject(data.properties)) {
if (data.properties.$first_referrer) {
data.properties.$first_referrer_host = getHostname(data.properties.$first_referrer, defaultHost);
}
if (isNotProfileType) {
if ('$referrer' in data.properties) {
data.properties.$referrer_host = data.properties.$referrer === '' ? '' : getHostname(data.properties.$referrer, defaultHost);
Expand Down Expand Up @@ -5927,10 +5926,12 @@
eqidObj['$search_keyword_id_hash'] = hashCode53(eqidObj['$search_keyword_id']);
}

var referrer = getReferrer(null, fullReferrer);
setOnceProfileFn(
extend({
$first_visit_time: new Date(),
$first_referrer: getReferrer(null, fullReferrer),
$first_referrer: referrer,
$first_referrer_host: referrer ? getHostname(referrer, '取值异常') : '',
$first_browser_language: isString(navigator.language) ? navigator.language.toLowerCase() : '取值异常',
$first_browser_charset: isString(document.charset) ? document.charset.toUpperCase() : '取值异常',
$first_traffic_source_type: getSourceFromReferrer(),
Expand Down Expand Up @@ -8103,7 +8104,7 @@
source: 'sa-web-sdk',
type: 'v-is-vtrack',
data: {
sdkversion: '1.24.6'
sdkversion: '1.24.7'
}
},
'*'
Expand Down
37 changes: 19 additions & 18 deletions product/sensorsdata.mtp.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -2230,19 +2230,6 @@
}
}

function getQueryParam(url, key) {
key = key.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
url = _decodeURIComponent(url);
var regexS = '[\\?&]' + key + '=([^&#]*)',
regex = new RegExp(regexS),
results = regex.exec(url);
if (results === null || (results && typeof results[1] !== 'string' && results[1].length)) {
return '';
} else {
return _decodeURIComponent(results[1]);
}
}


function getQueryParamsFromUrl(url) {
var result = {};
Expand All @@ -2254,6 +2241,21 @@
return result;
}

function getQueryParam(url, key) {
var urlParts = _URL(url);
var result = urlParts.searchParams.get(key) || '';

if (!result) {
var hash = urlParts.hash;
if (hash) {
var results = getQueryParamsFromUrl(hash);
result = results[key] || '';
}
}

return result;
}

function mediaQueriesSupported() {
return typeof window.matchMedia != 'undefined' || typeof window.msMatchMedia != 'undefined';
}
Expand Down Expand Up @@ -3067,7 +3069,7 @@
}

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
var sdkversion_placeholder = '1.24.6';
var sdkversion_placeholder = '1.24.7';
var domain_test_key = 'sensorsdata_domain_test';

var IDENTITY_KEY = {
Expand Down Expand Up @@ -3762,9 +3764,6 @@
var isNotProfileType = !data.type || data.type.slice(0, 7) !== 'profile';
var defaultHost = '取值异常';
if (isObject(data.properties)) {
if (data.properties.$first_referrer) {
data.properties.$first_referrer_host = getHostname(data.properties.$first_referrer, defaultHost);
}
if (isNotProfileType) {
if ('$referrer' in data.properties) {
data.properties.$referrer_host = data.properties.$referrer === '' ? '' : getHostname(data.properties.$referrer, defaultHost);
Expand Down Expand Up @@ -5923,10 +5922,12 @@
eqidObj['$search_keyword_id_hash'] = hashCode53(eqidObj['$search_keyword_id']);
}

var referrer = getReferrer(null, fullReferrer);
setOnceProfileFn(
extend({
$first_visit_time: new Date(),
$first_referrer: getReferrer(null, fullReferrer),
$first_referrer: referrer,
$first_referrer_host: referrer ? getHostname(referrer, '取值异常') : '',
$first_browser_language: isString(navigator.language) ? navigator.language.toLowerCase() : '取值异常',
$first_browser_charset: isString(document.charset) ? document.charset.toUpperCase() : '取值异常',
$first_traffic_source_type: getSourceFromReferrer(),
Expand Down
10 changes: 5 additions & 5 deletions sensorsdata.amd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sensorsdata.es6.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions sensorsdata.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var sensorsdata_js_sdk_latest_version ='1.24.6';
var sensorsdata_js_sdk_latest_version ='1.24.7';
if(typeof module ==='object' && typeof module.exports === 'object'){
module.exports = sensorsdata_js_sdk_latest_version;
}
2 changes: 1 addition & 1 deletion vtrack.min.js

Large diffs are not rendered by default.

0 comments on commit 8070b95

Please sign in to comment.