@modulbank/sendamo
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -30,3 +30,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function takeParamsForSendAmo(phoneNumber, name, actionType = 'PosBuyOnCreditCashbox', productCode = 'modulkassa.ru', comment) { | ||
var _a, _b, _c, _d, _e; | ||
var _a, _b, _c, _d, _e, _f; | ||
if (!regexp.test(phoneNumber)) { | ||
@@ -55,2 +55,4 @@ console.error('Error phone number type'); | ||
} | ||
// Идентификатор, если пришел в поисковых систем | ||
const searchEngine = (_a = window === null || window === void 0 ? void 0 : window.document) === null || _a === void 0 ? void 0 : _a.referrer; | ||
const params = { | ||
@@ -62,6 +64,6 @@ // @ts-ignore | ||
utmMedium: current.mdm, | ||
utmSource: current.src, | ||
utmSource: searchEngine || current.src, | ||
utmTerm: current.trm, | ||
google_id: (_b = (_a = window.digitalData) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.googleClientId, | ||
city: (_e = (_d = (_c = window.digitalData) === null || _c === void 0 ? void 0 : _c.context) === null || _d === void 0 ? void 0 : _d.location) === null || _e === void 0 ? void 0 : _e.city, | ||
google_id: (_c = (_b = window.digitalData) === null || _b === void 0 ? void 0 : _b.user) === null || _c === void 0 ? void 0 : _c.googleClientId, | ||
city: (_f = (_e = (_d = window.digitalData) === null || _d === void 0 ? void 0 : _d.context) === null || _e === void 0 ? void 0 : _e.location) === null || _f === void 0 ? void 0 : _f.city, | ||
a_aid: queryParams['a_aid'], | ||
@@ -68,0 +70,0 @@ phone: phoneNumber.replace(/[ \-()_]/g, ''), |
{ | ||
"name": "@modulbank/sendamo", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "send to amocrm method", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6895
149