AdsAudience::addLookalikeAudience

  1. Bitrix24 API (v. 23.675.0)
  2. seo
  3. AdsAudience
  4. addLookalikeAudience
  • Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/marketing/adsaudience.php
  • Класс: Bitrix\Seo\Marketing\AdsAudience
  • Вызов: AdsAudience::addLookalikeAudience
static function addLookalikeAudience($type, $accountId = null, $sourceAudienceId = null, $options = [])
{
	$audience = Service::getAudience($type);
	if (!$audience)
	{
		return null;
	}
	$audience->setAccountId($accountId);
	$addResult = $audience->createLookalike($sourceAudienceId, $options);
	if ($addResult->isSuccess() && $addResult->getId())
	{
		return $addResult->getId();
	}
	else
	{
		self::$errors = $addResult->getErrorMessages();
		return null;
	}
}

Добавить комментарий