Add a read-only Google AdSense analytics module for admins.
Connect AdSense over OAuth, sync entities and daily reports locally, and show placement performance in the admin panel without calling the Management API from public pages.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
final class AdsenseEntity extends Model
|
||||
{
|
||||
public const TYPE_AD_UNIT = 'ad_unit';
|
||||
|
||||
public const TYPE_CUSTOM_CHANNEL = 'custom_channel';
|
||||
|
||||
protected $fillable = [
|
||||
'account_resource_name',
|
||||
'ad_client_resource_name',
|
||||
'type',
|
||||
'resource_name',
|
||||
'reporting_dimension_id',
|
||||
'display_name',
|
||||
'active',
|
||||
'last_seen_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'active' => 'boolean',
|
||||
'last_seen_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user