@modulbank/sendamo
Advanced tools
Comparing version 0.0.25 to 0.0.26-beta-sm-8778-integration-with-cityes-add-3bbd56b4
@@ -55,3 +55,3 @@ 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; | ||
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"; | ||
const params = { | ||
@@ -63,3 +63,3 @@ // @ts-ignore | ||
utmMedium: current.mdm, | ||
utmSource: searchEngine || current.src, | ||
utmSource: searchEngine, | ||
utmTerm: current.trm, | ||
@@ -80,2 +80,26 @@ google_id: (_c = (_b = window.digitalData) === null || _b === void 0 ? void 0 : _b.user) === null || _c === void 0 ? void 0 : _c.googleClientId, | ||
} | ||
function sendPostBack() { | ||
const orderId = getCookie("order_id"); | ||
const clickId = getCookie("click_id"); | ||
return new Promise((resolve, reject) => { | ||
// @ts-ignore | ||
fetch(`https://postback.cityads.com/service/postback/?campaign_secret=oPBnE0&order_id='\'${orderId}&click_id=${clickId}`, { | ||
method: 'GET', | ||
headers: { | ||
'Content-Type': 'application/json;charset=utf-8', | ||
} | ||
}) | ||
.then((response) => __awaiter(this, void 0, void 0, function* () { | ||
if (response.status === 200) { | ||
resolve(response); | ||
} | ||
else { | ||
throw new Error(yield response.json()); | ||
} | ||
})) | ||
.catch((err) => { | ||
reject(err); | ||
}); | ||
}); | ||
} | ||
function sendAmo(params) { | ||
@@ -82,0 +106,0 @@ return new Promise((resolve, reject) => { |
{ | ||
"name": "@modulbank/sendamo", | ||
"version": "0.0.25", | ||
"version": "0.0.26-beta-sm-8778-integration-with-cityes-add-3bbd56b4", | ||
"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
7872
173
2