I have a code that protects against spam the send link to the mail
@if(filter_var($email, FILTER_VALIDATE_EMAIL))
@php
$split = explode('@', $email);
$first = $split[0];
$second = $split[1];
@endphp
<a data-first="{{ $first }}" data-second="{{ $second }}" class="js-combaine-email"></a>
@endif
It is used in two places on the site. And I want to add gtag to this link on click
<a onclick="gtag('event', 'email_click', {
'event_category' : 'website_clicks',
'event_label' : 'location_email'
});" data-first="{{ $first }}" data-second="{{ $second }}" class="js-combaine-email"></a>
But I want the event_label to change depending on the location it is in, let’s say for one 'event_label' : 'location1_email' and for another 'event_label' : 'location2_email'
I think I need to somehow add the eventLabel parameter and pass it depending on the connection location
But how can I implement all this, please tell me