@modulbank/sendamo
Advanced tools
Comparing version 0.0.26-beta-sm-8778-integration-with-cityes-add-3bbd56b4 to 0.0.26-beta-sm-8778-integration-with-cityes-add-42b4ec18
@@ -55,3 +55,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
// Идентификатор, если пришел в поисковых систем | ||
const searchEngine = ((_a = window === null || window === void 0 ? void 0 : window.document) === null || _a === void 0 ? void 0 : _a.referrer) ? getCookie("utm_source") : "current.src"; | ||
let searchEngine = ((_a = window === null || window === void 0 ? void 0 : window.document) === null || _a === void 0 ? void 0 : _a.referrer) || current.src; | ||
const utmSource = getCookie("utm_source"); | ||
if (utmSource) { | ||
searchEngine = utmSource; | ||
} | ||
const params = { | ||
@@ -79,5 +83,3 @@ // @ts-ignore | ||
} | ||
function sendPostBack() { | ||
const orderId = getCookie("order_id"); | ||
const clickId = getCookie("click_id"); | ||
function sendPostBack(clickId, orderId) { | ||
return new Promise((resolve, reject) => { | ||
@@ -116,2 +118,8 @@ // @ts-ignore | ||
if (response.status === 200) { | ||
const orderId = getCookie("order_id"); | ||
const clickId = getCookie("click_id"); | ||
const utmSource = getCookie("utm_source"); | ||
if (utmSource === "cityads") { | ||
sendPostBack(clickId, orderId); | ||
} | ||
resolve(response); | ||
@@ -118,0 +126,0 @@ } |
{ | ||
"name": "@modulbank/sendamo", | ||
"version": "0.0.26-beta-sm-8778-integration-with-cityes-add-3bbd56b4", | ||
"version": "0.0.26-beta-sm-8778-integration-with-cityes-add-42b4ec18", | ||
"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
8199
181