• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/analytics/services/accountfacebook.php
  • Класс: BitrixSeoAnalyticsServicesAccountFacebook
  • Вызов: AccountFacebook::updateAnalyticParams
public function updateAnalyticParams($accountId, array $params, array $publicPageIds = [])
{
	// get all ads
	// get current ad creative for each
	// create new ad creative for each with new url_tags
	// update each ad with new creative
	$result = new ResponseFacebook();
	if(empty($params))
	{
		return $result;
	}
	if(!empty($params['url_tags']))
	{
		$updateAdResult = $this->updateAdUrlTags($accountId, $params['url_tags']);
		if(!$updateAdResult->isSuccess())
		{
			$result->addErrors($updateAdResult->getErrors());
		}
	}

	if($this->hasPublicPages() && !empty($params['phone']) || !empty($params['email']))
	{
		foreach($publicPageIds as $publicPageId)
		{
			$updatePageResult = $this->updatePublicPage($publicPageId, $params);
			if(!$updatePageResult->isSuccess())
			{
				$result->addErrors($updatePageResult->getErrors());
			}
		}
	}

	return $result;
}