flamix / conversions
Class to work with conversion APP
Installs: 1 923
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.4
This package is auto-updated.
Last update: 2024-11-26 18:55:59 UTC
README
Site - https://flamix.solutions/bitrix24/marketing/conversion.php
Install
composer require flamix/conversions
Usage
try { \Flamix\Conversions\Conversion::getInstance()->setCode('YOR_CODE')->setDomain('example.com')->addFromCookie(); //OR \Flamix\Conversions\Conversion::getInstance()->setCode('YOR_CODE')->setDomain('example.com')->add('UID', 150, 'RUB'); } catch (Exception $e) { //Handle ERROR $e->getMessage(); }
Add input with UID
echo \Flamix\Conversions\Conversion::getInput();
This return
<input type='hidden' name='UF_CRM_FX_CONVERSION' value='1559040249567571161;GA1.2.885407728.1598192418;fb.1.1598192425982.77587948' />
You can add this in your form (if all data from form send to Bitrix24)
Return UID in format
\Flamix\Conversions\Conversion::getPreparedUID();
You can add this BEFORE you add LEAD to Bitrix24
/** * Добавляем метки в ЛИД (нужен для рекламы) */ if(\Flamix\Conversions\Conversion::getPreparedUID()) $param['UF_CRM_FX_CONVERSION'] = \Flamix\Conversions\Conversion::getPreparedUID();