Accounts、Campaigns、Ad Sets 、Ads 数据字段新增 platform_purchase、pixel_purchase ;删除assisted_purchases、last_clicked_purchases 3

This commit is contained in:
huangguancheng 2025-01-22 14:36:00 +08:00
parent 29b2f2584b
commit e6d3fb9b78

View File

@ -388,8 +388,8 @@ class AdsInsightService
$sheet->setCellValue('B' . $row, self::$statusMapping[$campaign['status']]); // Status
$sheet->setCellValue('C' . $row, self::$platformMapping[$campaign['platform_type']]); // Platform Type
$sheet->setCellValueExplicit('D' . $row, (string)$campaign['account_id'], \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING);
$sheet->setCellValue('E' . $row, $campaign['platform_purchase']);
$sheet->setCellValue('F' . $row, $campaign['pixel_purchase']);
$sheet->setCellValue('E' . $row, $campaign['platform_purchase']);
$sheet->setCellValue('F' . $row, $campaign['pixel_purchase']);
$sheet->setCellValue('G' . $row, $campaign['roas']); // ROAS
$sheet->setCellValue('H' . $row, $campaign['spend']); // Amount Spent
$sheet->setCellValue('I' . $row, $campaign['impressions']); // Impressions
@ -544,8 +544,8 @@ class AdsInsightService
$statistics = $adsetList['statistics'];
$statisticsRow = $row; // 统计信息从当前行开始
$sheet->setCellValue('D' . $statisticsRow, 'Totals'); // 统计信息标题
$sheet->setCellValue('E' . $statisticsRow, $statistics['platform_purchase']);
$sheet->setCellValue('F' . $statisticsRow, $statistics['pixel_purchase']);
$sheet->setCellValue('E' . $statisticsRow, $statistics['platform_purchase']);
$sheet->setCellValue('F' . $statisticsRow, $statistics['pixel_purchase']);
$sheet->setCellValue('G' . $statisticsRow, $statistics['roas']); // ROAS
$sheet->setCellValue('H' . $statisticsRow, $statistics['amount_spend']); // Amount Spent
$sheet->setCellValue('I' . $statisticsRow, $statistics['impressions']); // Impressions
@ -652,8 +652,8 @@ class AdsInsightService
$sheet->setCellValue('B' . $row, self::$statusMapping[$ad['status']]); // Status
$sheet->setCellValue('C' . $row, self::$platformMapping[$ad['platform_type']]); // Platform Type
$sheet->setCellValueExplicit('D' . $row, (string)$ad['account_id'], \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING);
$sheet->setCellValue('E' . $row, $ad['platform_purchase']);
$sheet->setCellValue('F' . $row, $ad['pixel_purchase']);
$sheet->setCellValue('E' . $row, $ad['platform_purchase']);
$sheet->setCellValue('F' . $row, $ad['pixel_purchase']);
$sheet->setCellValue('G' . $row, $ad['roas']); // ROAS
$sheet->setCellValue('H' . $row, $ad['spend']); // Amount Spent
$sheet->setCellValue('I' . $row, $ad['impressions']); // Impressions
@ -676,8 +676,8 @@ class AdsInsightService
$statistics = $adList['statistics'];
$statisticsRow = $row; // 统计信息从当前行开始
$sheet->setCellValue('D' . $statisticsRow, 'Totals'); // 统计信息标题
$sheet->setCellValue('E' . $statisticsRow, $statistics['platform_purchase']);
$sheet->setCellValue('F' . $statisticsRow, $statistics['pixel_purchase']);
$sheet->setCellValue('E' . $statisticsRow, $statistics['platform_purchase']);
$sheet->setCellValue('F' . $statisticsRow, $statistics['pixel_purchase']);
$sheet->setCellValue('G' . $statisticsRow, $statistics['roas']); // ROAS
$sheet->setCellValue('H' . $statisticsRow, $statistics['amount_spend']); // Amount Spent
$sheet->setCellValue('I' . $statisticsRow, $statistics['impressions']); // Impressions