Источник заказа (referer + utm)
Иногда приходят заказы и не можем сейчас понять, по какому каналу рекламы они перешли. Инструменты отслеживания в виде гугл аналитики или яндекс метрики есть,
но хотелось бы наглядно видеть в самой админке.
Сейчас https://prnt.sc/k8s7ax , хотелось быhttps://prnt.sc/k8s7yp
Кроме этого, если есть UTM метки, их необходимо записать.
1. Создать новую таблицу (source) в базе, куда мы записываем данные о человеке сделавший заказ.
Обязательные Поля:
source_id - автоинкремент
order_id - номер заказа
utm_sourse - utm метка
utm_medium - utm метка
utm_compaing - utm метка
utm_content - utm метка
referer - источник перехода на магазин
2. В контроллере header
мы определяем создаем условие:
есть ли куки referer. Если их нету, то создаем и туда записывает откуда к нам пришли.
Также записываем в куки утм метки. Срок жизни куки, наверное неделя. (пока нет понимания, какой период более правильный.)
Часть кода можно взять тут: https://opencartforum.com/topic/109253-v-zavisimosti-ot-istochnika-trafika-podstavka-bukvy-k-artikulu/?tab=comments#comment-1048968
Но можно и все самому написать -)
3. в контроллере checkout/confirm или в checkout/success - отправляем все собранные данные в таблицу.
4. В админке/список заказов, разрисовываем на свое усмотрение). Отталкиваемся больше от referer, если он пуст, то тогда смотрим что в utm_sourse. ЧТобы было понятнее, на примере,
если в referer у нас есть FACEBOOK, то подсветим поле синим. Если нету, то смотрим utm_sourse, если там есть FACEBOOK, (подсвечиваем синим), если и там нету, то стили не трогаем.
Current freelance projects in the category PHP
Fix CLSIt is necessary to fix the Cumulative Layout Shift through code PageSpeed does not see this problem, but through Google Chrome, it is visible that there is a layout shift for the desktop version of the page According to Google Search, there is an error regarding the speed of… PHP, Web Programming ∙ 1 day 3 hours back ∙ 26 proposals |
Transfer the fully ready adaptive HTML5 structure to WordPress.
267 USD
I am looking for an experienced WordPress developer who can convert our meticulously prepared static HTML5/CSS3 code into a high-performance custom WordPress theme. The frontend is almost ready (about 99%): semantic markup, metadata, and multilingual structure (hreflang) are… Content Management Systems, PHP ∙ 1 day 6 hours back ∙ 61 proposals |
GoPos IntegrationHello, has anyone done an integration of GoPos with a custom website for a restaurant in Poland? I need help, their documentation is very sparse, there is only swagger and it lacks descriptions. https://app.gopos.io/doc/swagger-ui/index.html The essence is this: we used their… PHP, Web Programming ∙ 1 day 22 hours back ∙ 25 proposals |
Write meta data for ALT using AIA website on Laravel, the site has many images for which it is necessary to automatically generate correct semantic and relevant ALT descriptions for the images, with the possibility of verification. AI & Machine Learning, PHP ∙ 2 days 19 hours back ∙ 34 proposals |
A developer is needed to complete and integrate a project for automatic data collection and processing.
16 USD
The main part of the parser has already been implemented. The parser works in a Windows environment through Microsoft Edge: the site has anti-bot protection, so data collection is performed not through direct HTTP requests, but through a live browser session. The scripts control… PHP, Web Programming ∙ 3 days 1 hour back ∙ 25 proposals |