- SEO/ads: title, description, canonical, OG 1200x630, JSON-LD, robots, sitemap, .htaccess - Privacy policy page with operator data; server-side consent check; cookie reset in footer - Metrika loads only after cookie consent; goals lead / email_click / phone_click; utm and yclid stored with the lead - Form delivery: store, Telegram, SMTP, webhook; config presets; dev stub - Project window shows public sections only; Moba copy rewritten - Fix 14 px horizontal overflow in the filter bar on phones - Move history to archive/; add docs/project-inventory.md and docs/lead-delivery.md
63 lines
3.1 KiB
PHP
63 lines
3.1 KiB
PHP
<?php
|
||
/**
|
||
* Copy this file to config.php and fill in real values.
|
||
* config.php is gitignored — never commit credentials.
|
||
*
|
||
* Every channel with a non-empty value is used, in this order:
|
||
* 1. store — ALWAYS on. Lead is appended to api/var/leads/YYYY-MM.jsonl.
|
||
* 2. telegram — BOT_TOKEN + TG_CHAT_ID
|
||
* 3. email — MAIL_TO + (SMTP_* or MAIL_MODE = 'mail')
|
||
* 4. webhook — WEBHOOK_URL (+ optional WEBHOOK_TOKEN)
|
||
*
|
||
* The form reports success when at least one of 2–4 accepted the lead.
|
||
* With everything empty the endpoint answers 500 — the form is never silently dead.
|
||
*/
|
||
|
||
/* ---------- 1. Telegram ----------
|
||
* Bot: @BotFather → /newbot. Add the bot to the target chat, send any message
|
||
* (for groups: /start@your_bot), then GET
|
||
* https://api.telegram.org/bot<TOKEN>/getUpdates and read message.chat.id
|
||
* (group ids start with '-'). */
|
||
const BOT_TOKEN = '';
|
||
const TG_CHAT_ID = '';
|
||
|
||
/* ---------- 2. Email ----------
|
||
* MAIL_MODE = 'smtp' — the built-in client (AUTH LOGIN + SSL/STARTTLS), no Composer.
|
||
* MAIL_MODE = 'mail' — PHP mail(); works on many shared hosts, weaker deliverability.
|
||
*
|
||
* MAIL_FROM must belong to the domain that has SPF/DKIM configured, otherwise
|
||
* Gmail/VK/Yandex will spam-filter every lead.
|
||
*
|
||
* Presets (copy the block you need):
|
||
* Yandex 360: SMTP_HOST = 'smtp.yandex.ru'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
|
||
* SMTP_USER = 'site@harveymonsterteam.ru'; (password = app password)
|
||
* Mail.ru: SMTP_HOST = 'smtp.mail.ru'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
|
||
* Unisender Go:SMTP_HOST = 'smtp.go1.unisender.ru'; SMTP_PORT = 587; SMTP_SECURE = 'tls';
|
||
* SendPulse: SMTP_HOST = 'smtp-pulse.com'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
|
||
* Mailgun: SMTP_HOST = 'smtp.mailgun.org'; SMTP_PORT = 587; SMTP_SECURE = 'tls';
|
||
* Brevo: SMTP_HOST = 'smtp-relay.brevo.com'; SMTP_PORT = 587; SMTP_SECURE = 'tls';
|
||
* Timeweb: SMTP_HOST = 'smtp.timeweb.ru'; SMTP_PORT = 465; SMTP_SECURE = 'ssl';
|
||
*/
|
||
const MAIL_MODE = 'smtp'; // 'smtp' | 'mail'
|
||
const MAIL_TO = 'monsterharvi@gmail.com';
|
||
const MAIL_FROM = 'site@harveymonsterteam.ru';
|
||
const MAIL_FROM_NAME = 'Harvey Monster Team';
|
||
const MAIL_SUBJECT = 'Заявка с harveymonsterteam.ru';
|
||
|
||
const SMTP_HOST = '';
|
||
const SMTP_PORT = 465;
|
||
const SMTP_SECURE = 'ssl'; // 'ssl' (465) | 'tls' (587, STARTTLS) | '' (25, plain)
|
||
const SMTP_USER = '';
|
||
const SMTP_PASS = '';
|
||
|
||
/* ---------- 3. Webhook ----------
|
||
* Any endpoint that accepts JSON:
|
||
* {"site","sent_at","name","contact","message","consent","meta":{utm,yclid,…}}
|
||
* Works directly with Make / n8n / Zapier / Albato / a custom handler.
|
||
* Native CRM and ESP APIs (Bitrix24, amoCRM, Unisender, SendPulse) need their own
|
||
* field mapping — point the webhook at a no-code scenario that does the mapping
|
||
* (recipe in docs/lead-delivery.md), not at the API URL directly.
|
||
* WEBHOOK_TOKEN, when set, is sent as `Authorization: Bearer <token>`. */
|
||
const WEBHOOK_URL = '';
|
||
const WEBHOOK_TOKEN = '';
|