{"id":345816,"date":"2023-02-23T21:01:07","date_gmt":"2023-02-23T21:01:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345816"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345816","title":{"rendered":"<span>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u043e\u0440\u043c\u044b \u0432 \u0413\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440!<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043c\u043e\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u043d \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u043e\u0439 \u0444\u0440\u0430\u0437\u044b.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438. \u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0412 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043c\u0430\u043b\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f google apps script \u0438 \u0444\u043e\u0440\u043c\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438. <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0443 \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443.<\/p>\n<p>\u0428\u0430\u0433 1: \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0433\u0443\u0433\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442<\/p>\n<p>\u0422\u0443\u0442 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0443. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a leadCount ma_name ma_email referer formid send.\u00a0<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/639\/eb3\/66e\/639eb366e44e92a82ae34e210e233946.png\" width=\"1370\" height=\"238\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/639\/eb3\/66e\/639eb366e44e92a82ae34e210e233946.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0428\u0430\u0433 2: \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<p>\u0412 \u043b\u0435\u043d\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u2192 Apps Script<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/291\/ce8\/196\/291ce8196923ea54938e65db16a40891.png\" width=\"1918\" height=\"350\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/291\/ce8\/196\/291ce8196923ea54938e65db16a40891.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 myFunction \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u0434 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"javascript\">function doPost(e){   const sheet = SpreadsheetApp.getActiveSheet();   \u0441onst n = sheet.getLastRow() + 1;   const d = new Date();  \u00a0\u00a0sheet.getRange(\"A\"+n).setValue(e.parameter.p1); \/\/ leadCount \u00a0\u00a0sheet.getRange(\"B\"+n).setValue(e.parameter.p2); \/\/ ma_name \u00a0\u00a0sheet.getRange(\"C\"+n).setValue(e.parameter.p3); \/\/ ma_email \u00a0\u00a0sheet.getRange(\"D\"+n).setValue(e.parameter.p4); \/\/ refferer \u00a0\u00a0sheet.getRange(\"E\"+n).setValue(e.parameter.p5); \/\/ formid \u00a0\u00a0sheet.getRange(\"F\"+n).setValue(d);   return ContentService.createTextOutput().append(JSON.stringify({result: 'comlite'})) }<\/code><\/pre>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<p><code>function doPost(e) <\/code>&#8212; \u0442\u0430\u043a \u0433\u0443\u0433\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u0438 post \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443.<\/p>\n<p><code>const sheet = SpreadsheetApp.getActiveSheet();<\/code> &#8212; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. <\/p>\n<p><code>\u0441onst n=sheet.getLastRow()+1;<\/code> &#8212; \u0438\u0449\u0435\u043c \u043d\u043e\u043c\u0435\u0440 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. <\/p>\n<p><code>const d = new Date();<\/code> &#8212; \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433. <\/p>\n<p><code>sheet.getRange(\"A\"+n).setValue(e.parameter.p1);<\/code> &#8212; \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u044f\u0447\u0435\u0439\u043a\u0443. <\/p>\n<p><code>return ContentService.createTextOutput().append(JSON.stringify({result: 'comlite'}))<\/code> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438.\u00a0<\/p>\n<p>\u0428\u0430\u0433 3: \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<p>\u0422\u044f\u043d\u0435\u043c\u0441\u044f \u043c\u044b\u0448\u043a\u043e\u0439 \u043a \u043a\u043d\u043e\u043f\u043a\u0435 \u041d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u2192 \u041d\u043e\u0432\u043e\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0422\u0438\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u2192 \u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fac\/74e\/16e\/fac74e16e558775d08c1f92dc0ab0aaa.png\" width=\"1080\" height=\"288\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fac\/74e\/16e\/fac74e16e558775d08c1f92dc0ab0aaa.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u2192 \u041e\u0442 \u043c\u043e\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438 (\u0432\u0430\u0448\u0430\u043f\u043e\u0447\u0442\u0430@gamil.com)<br \/>\u0423 \u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u2192 \u0412\u0441\u0435<br \/>\u041d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 &#8212; \u041d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/p>\n<p>\u0413\u0443\u0433\u043b \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u043e\u0431\u0449\u0438\u0442, \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u043c\u0441\u044f \u0438 \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.\u00a0<\/p>\n<p>\u0428\u0430\u0433 4: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u0432\u0438\u0434\u0430\u00a0https:\/\/script.google.com\/macros\/s\/\u0418\u0414\u0415\u041d\u0422\u0418\u0424\u0418\u041a\u0410\u0422\u041e\u0420_\u0420\u0410\u0417\u0412\u0415\u0420\u0422\u042b\u0412\u041d\u0418\u042f\/exec?p1=1&amp;p2=An&amp;p3=rrree@mail.ru&amp;p4=site.ru&amp;p5=form1<\/p>\n<p>\u0433\u0434\u0435 p1, p2, p3, p4, p5 &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u0444\u043e\u0440\u043c\u044b \u0438\u043b\u0438 \u0438\u0437 JavaScript. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430. <br \/>\u041f\u043e \u0441\u0443\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0441 GET \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c <code>doGet()<\/code>, \u043d\u043e doGet \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0445 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/718790\/\"> https:\/\/habr.com\/ru\/post\/718790\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440!<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043c\u043e\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u043d \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u043e\u0439 \u0444\u0440\u0430\u0437\u044b.<\/p>\n<p>\u0412 \u0445\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438. \u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0412 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043c\u0430\u043b\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f google apps script \u0438 \u0444\u043e\u0440\u043c\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438. <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0443 \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443.<\/p>\n<p>\u0428\u0430\u0433 1: \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0433\u0443\u0433\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442<\/p>\n<p>\u0422\u0443\u0442 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u0434 \u0437\u0430\u0434\u0430\u0447\u0443. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a leadCount ma_name ma_email referer formid send.\u00a0<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0428\u0430\u0433 2: \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<p>\u0412 \u043b\u0435\u043d\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u2192 Apps Script<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 myFunction \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u0434 \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"javascript\">function doPost(e){   const sheet = SpreadsheetApp.getActiveSheet();   \u0441onst n = sheet.getLastRow() + 1;   const d = new Date();  \u00a0\u00a0sheet.getRange(\"A\"+n).setValue(e.parameter.p1); \/\/ leadCount \u00a0\u00a0sheet.getRange(\"B\"+n).setValue(e.parameter.p2); \/\/ ma_name \u00a0\u00a0sheet.getRange(\"C\"+n).setValue(e.parameter.p3); \/\/ ma_email \u00a0\u00a0sheet.getRange(\"D\"+n).setValue(e.parameter.p4); \/\/ refferer \u00a0\u00a0sheet.getRange(\"E\"+n).setValue(e.parameter.p5); \/\/ formid \u00a0\u00a0sheet.getRange(\"F\"+n).setValue(d);   return ContentService.createTextOutput().append(JSON.stringify({result: 'comlite'})) }<\/code><\/pre>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u0430.<\/p>\n<p><code>function doPost(e) <\/code>&#8212; \u0442\u0430\u043a \u0433\u0443\u0433\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u0438 post \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443.<\/p>\n<p><code>const sheet = SpreadsheetApp.getActiveSheet();<\/code> &#8212; \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. <\/p>\n<p><code>\u0441onst n=sheet.getLastRow()+1;<\/code> &#8212; \u0438\u0449\u0435\u043c \u043d\u043e\u043c\u0435\u0440 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. <\/p>\n<p><code>const d = new Date();<\/code> &#8212; \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0434\u0430\u0442\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433. <\/p>\n<p><code>sheet.getRange(\"A\"+n).setValue(e.parameter.p1);<\/code> &#8212; \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u044f\u0447\u0435\u0439\u043a\u0443. <\/p>\n<p><code>return ContentService.createTextOutput().append(JSON.stringify({result: 'comlite'}))<\/code> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438.\u00a0<\/p>\n<p>\u0428\u0430\u0433 3: \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<p>\u0422\u044f\u043d\u0435\u043c\u0441\u044f \u043c\u044b\u0448\u043a\u043e\u0439 \u043a \u043a\u043d\u043e\u043f\u043a\u0435 \u041d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u2192 \u041d\u043e\u0432\u043e\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0422\u0438\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u2192 \u0412\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u2192 \u041e\u0442 \u043c\u043e\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438 (\u0432\u0430\u0448\u0430\u043f\u043e\u0447\u0442\u0430@gamil.com)<br \/>\u0423 \u043a\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u2192 \u0412\u0441\u0435<br \/>\u041d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 &#8212; \u041d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/p>\n<p>\u0413\u0443\u0433\u043b \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u043e\u0431\u0449\u0438\u0442, \u0447\u0442\u043e \u043e\u043d\u043e \u043d\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u043c\u0441\u044f \u0438 \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e.\u00a0<\/p>\n<p>\u0428\u0430\u0433 4: \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u0432\u0438\u0434\u0430\u00a0https:\/\/script.google.com\/macros\/s\/\u0418\u0414\u0415\u041d\u0422\u0418\u0424\u0418\u041a\u0410\u0422\u041e\u0420_\u0420\u0410\u0417\u0412\u0415\u0420\u0422\u042b\u0412\u041d\u0418\u042f\/exec?p1=1&amp;p2=An&amp;p3=rrree@mail.ru&amp;p4=site.ru&amp;p5=form1<\/p>\n<p>\u0433\u0434\u0435 p1, p2, p3, p4, p5 &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u0444\u043e\u0440\u043c\u044b \u0438\u043b\u0438 \u0438\u0437 JavaScript. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0433\u0443\u0433\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430. <br \/>\u041f\u043e \u0441\u0443\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0441 GET \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c <code>doGet()<\/code>, \u043d\u043e doGet \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0445 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/718790\/\"> https:\/\/habr.com\/ru\/post\/718790\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-345816","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345816"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345816\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}