static function getStaticSources()
{
$list = [
[
'CODE' => 'google',
'ICON_CLASS' => 'ui-icon ui-icon-service-google-ads',
'ICON_COLOR' => '#3889db',
'CONFIGURABLE' => true,
'ADVERTISABLE' => true,
'HAS_PATH_TO_LIST' => true,
'REF_DOMAIN' => [
/*
['regexp' => 'www\.google\.[A-Za-z]{2,3}'],
['regexp' => 'www\.google\.com\.[A-Za-z]{2,3}'],
'www.g.cn',
*/
],
'UTM_CONTENT' => 'cid|{campaignid}|gid|{adgroupid}|kwid|{targetid}',
],
];
if (!Product::isRegionRussian(true))
{
$list[] = [
'CODE' => 'fb',
'ICON_CLASS' => 'ui-icon ui-icon-service-fb',
'ICON_COLOR' => '#38659f',
'CONFIGURABLE' => true,
'ADVERTISABLE' => true,
'HAS_PATH_TO_LIST' => true,
'REF_DOMAIN' => Settings::isSocialRefDomainUsed()
? ['www.facebook.com', 'facebook.com']
: [],
'UTM_CONTENT' => 'cid|{{campaign.id}}|gid|{{adset.id}}|kwid|{{ad.id}}',
];
$list[] = [
'CODE' => 'instagram',
'ICON_CLASS' => 'ui-icon ui-icon-service-instagram',
'ICON_COLOR' => '#d56c9a',
'CONFIGURABLE' => true,
'ADVERTISABLE' => true,
'HAS_PATH_TO_LIST' => true,
'REF_DOMAIN' => Settings::isSocialRefDomainUsed()
? ['www.instagram.com', 'instagram.com']
: []
,
];
}
if (Product::isRegionRussian())
{
$list[] = [
'CODE' => 'vkads',
'ICON_CLASS' => 'ui-icon ui-icon-service-vkads',
'ICON_COLOR' => '#0077FF',
'CONFIGURABLE' => true,
'ADVERTISABLE' => true,
'HAS_PATH_TO_LIST' => true,
'REF_DOMAIN' => Settings::isSocialRefDomainUsed()
? ['www.ads.vk.com', 'ads.vk.com']
: [],
];
$list[] = [
'CODE' => 'vk',
'ICON_CLASS' => 'ui-icon ui-icon-service-vk',
'ICON_COLOR' => '#3871ba',
'CONFIGURABLE' => true,
'ADVERTISABLE' => true,
'HAS_PATH_TO_LIST' => true,
'REF_DOMAIN' => Settings::isSocialRefDomainUsed()
? ['www.vk.com', 'vk.com']
: [],
];
$list[] = [
'CODE' => 'yandex',
'ICON_CLASS' => 'ui-icon ui-icon-service-ya-direct',
'ICON_COLOR' => '#ffce00',
'CONFIGURABLE' => true,
'ADVERTISABLE' => true,
'HAS_PATH_TO_LIST' => true,
'REF_DOMAIN' => [
/*
'ya.ru', 'yandex.asia', 'yandex.mobi',
['regexp' => 'yandex\.[A-Za-z]{2,6}'],
*/
],
];
$list[] = [
'CODE' => '1c',
'ICON_CLASS' => 'ui-icon ui-icon-service-1c',
'ICON_COLOR' => '#fade39',
'CONFIGURABLE' => true,
'HAS_PATH_TO_LIST' => true,
'SHOW_ONLY_EXISTS' => true,
];
}
$list[] = [
'ID' => 0,
'CODE' => 'organic',
'DESCRIPTION' => Source\Base::getDescriptionByCode('organic'),
'ICON_CLASS' => 'ui-icon ui-icon-service-organic',
'ICON_COLOR' => '',
'CONFIGURED' => true,
'CONFIGURABLE' => false,
'HAS_PATH_TO_LIST' => true,
];
if (Integration\Sender\Utm::canUse())
{
$list[] = [
'CODE' => Source\Base::Sender,
'ICON_CLASS' => 'ui-icon ui-icon-service-campaign',
'ICON_COLOR' => '#2ebef0',
'CONFIGURED' => true,
'CONFIGURABLE' => false,
'SAVEABLE' => true,
'HAS_PATH_TO_LIST' => true,
'UTM_SOURCE' => Integration\Sender\Utm::getUtmSources()
];
}
foreach ($list as $index => $item)
{
$item['NAME'] = Source\Base::getNameByCode($item['CODE']);
$item['SHORT_NAME'] = Source\Base::getShortNameByCode($item['CODE']);
$list[$index] = $item;
}
return $list;
}