flamix/conversions

There is no license information available for the latest version (v1.0) of this package.

Class to work with conversion APP

v1.0 2023-10-04 11:25 UTC

This package is auto-updated.

Last update: 2024-11-26 18:55:59 UTC


README

Screenshot

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)

Screenshot

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();