Skip to content

Commit

Permalink
Update ClickService.php
Browse files Browse the repository at this point in the history
  • Loading branch information
yordadev committed Jun 5, 2024
1 parent c6bf5bd commit 3d8f3e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Services/ClickService.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ class ClickService
/**
* @throws ClickServiceException
*/
public static function track(string $identifier, string $request_ip, int $outcome_id, bool $test = false): void
public static function track(string $identifier, string $request_ip, int $outcome_id, ?string $domain = null): void
{
$request_ip = config('location.testing.enabled') ? config('location.testing.ip') : $request_ip;

try {
ClickRepository::createClick(
UrlRepository::findByIdentifier($identifier)->id,
UrlRepository::findByDomainIdentifier($identifier, $domain)->id,
LocationRepository::findOrCreateLocationRecord(
! $test
! config('location.testing.enabled')
? LocationRepository::getLocationFrom($request_ip)
: LocationRepository::locationUnknown($request_ip)
)->id,
Expand Down

0 comments on commit 3d8f3e6

Please sign in to comment.