Skip to content

Commit

Permalink
Check tagmanager enabled before http call
Browse files Browse the repository at this point in the history
  • Loading branch information
tjardoo committed Dec 18, 2023
1 parent 95320b7 commit 94633b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/MeasurementProtocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public function event(string $name, array $params = null): array
$event['params'] = $params;
}

if (config('tagmanager.enabled') === false) {
return [
'status' => 'tagmanager disabled',
];
}

$response = Http::withHeaders([
'content-type' => 'application/json',
])
Expand Down

0 comments on commit 94633b0

Please sign in to comment.