Skip to content

Commit 685d610

Browse files
authored
Merge pull request #26 from keepsuit/clarity
microsoft clarity service
2 parents 376e954 + 470a595 commit 685d610

File tree

8 files changed

+78
-7
lines changed

8 files changed

+78
-7
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,3 @@ parameters:
55
identifier: catch.neverThrown
66
count: 1
77
path: src/CookieSolution.php
8-
9-
-
10-
message: '#^Parameter \#1 \$view of function view expects view\-string\|null, string given\.$#'
11-
identifier: argument.type
12-
count: 1
13-
path: src/CookieSolution.php
14-

resources/lang/de/services.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
'mailchimp' => [
4242
'description' => 'Mailchimp ist ein E-Mail-Marketingdienst, der es uns ermöglicht, E-Mails an unsere Kunden zu senden. Mailchimp kann persönliche Informationen wie Namen, E-Mail-Adressen und Browsing-Daten sammeln.',
4343
],
44+
'microsoft_clarity' => [
45+
'description' => 'Microsoft Clarity ist ein Analysedienst, der es uns ermöglicht, Daten über die Nutzung unserer Website zu sammeln, um deren Betrieb zu verbessern. Microsoft kann Informationen wie Klicks, Mausbewegungen, besuchte Seiten und andere Verhaltensdaten sammeln.',
46+
'cookies' => [
47+
'_clck' => 'Speichert die Clarity-Benutzer-ID und Einstellungen, die für diese Website eindeutig sind und demselben Benutzer zugeordnet werden.',
48+
'_clsk' => 'Verbindet mehrere Seitenaufrufe eines Nutzers zu einer einzigen Clarity-Sitzungsaufzeichnung.',
49+
'CLID' => 'Identifiziert das erste Mal, dass Clarity diesen Nutzer auf einer beliebigen Website mit Clarity gesehen hat.',
50+
],
51+
],
4452
'paypal' => [
4553
'description' => 'PayPal ist ein Zahlungsdienst, der es uns ermöglicht, Zahlungen von unseren Kunden anzunehmen. PayPal kann persönliche Informationen wie Namen, E-Mail-Adressen und Rechnungsinformationen sammeln.',
4654
],

resources/lang/en/services.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
'mailchimp' => [
4242
'description' => 'Mailchimp is an email marketing service that allows us to send emails to our customers. Mailchimp may collect personal information such as names, email addresses, and browsing data.',
4343
],
44+
'microsoft_clarity' => [
45+
'description' => 'Microsoft Clarity is an analysis service that allows us to collect data on the use of our website to improve its operation. Microsoft could collect information such as click, mouse movements, visited pages and other behavioral data.',
46+
'cookies' => [
47+
'_clck' => 'Persists the Clarity User ID and preferences, unique to that site is attributed to the same user ID.',
48+
'_clsk' => 'Connects multiple page views by a user into a single Clarity session recording.',
49+
'CLID' => 'Identifies the first-time Clarity saw this user on any site using Clarity.',
50+
],
51+
],
4452
'paypal' => [
4553
'description' => 'PayPal is a payment service that allows us to accept payments from our customers. PayPal may collect personal information such as names, email addresses, and billing information.',
4654
],

resources/lang/es/services.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
'mailchimp' => [
4242
'description' => 'Mailchimp es un servicio de marketing por correo electrónico que nos permite enviar correos electrónicos a nuestros clientes. Mailchimp puede recopilar información personal como nombres, direcciones de correo electrónico y datos de navegación.',
4343
],
44+
'microsoft_clarity' => [
45+
'description' => 'Microsoft Clarity es un servicio de análisis que nos permite recopilar datos sobre el uso de nuestro sitio web para mejorar su funcionamiento. Microsoft puede recopilar información como clics, movimientos del ratón, páginas visitadas y otros datos de comportamiento.',
46+
'cookies' => [
47+
'_clck' => 'Conserva el ID de usuario de Clarity y las preferencias, único para este sitio y atribuido al mismo ID de usuario.',
48+
'_clsk' => 'Conecta varias páginas vistas por un usuario en una sola grabación de sesión de Clarity.',
49+
'CLID' => 'Identifica la primera vez que Clarity vio a este usuario en cualquier sitio que utilice Clarity.',
50+
],
51+
],
4452
'paypal' => [
4553
'description' => 'PayPal es un servicio de pago que nos permite aceptar pagos de nuestros clientes. PayPal puede recopilar información personal como nombres, direcciones de correo electrónico e información de facturación.',
4654
],

resources/lang/fr/services.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
'mailchimp' => [
4242
'description' => 'Mailchimp est un service de marketing par e-mail qui nous permet d\'envoyer des e-mails à nos clients. Mailchimp peut collecter des informations personnelles telles que des noms, des adresses électroniques et des données de navigation.',
4343
],
44+
'microsoft_clarity' => [
45+
'description' => "Microsoft Clarity est un service d'analyse qui nous permet de collecter des données sur l'utilisation de notre site web afin d'en améliorer le fonctionnement. Microsoft peut collecter des informations telles que les clics, les mouvements de la souris, les pages visitées et d'autres données comportementales.",
46+
'cookies' => [
47+
'_clck' => "Conserve l'identifiant utilisateur Clarity et les préférences, unique à ce site et attribué au même identifiant utilisateur.",
48+
'_clsk' => 'Relie plusieurs pages vues par un utilisateur en un seul enregistrement de session Clarity.',
49+
'CLID' => "Identifie la première fois que Clarity a vu cet utilisateur sur n'importe quel site utilisant Clarity.",
50+
],
51+
],
4452
'paypal' => [
4553
'description' => 'PayPal est un service de paiement qui nous permet d\'accepter des paiements de nos clients. PayPal peut collecter des informations personnelles telles que des noms, des adresses électroniques et des informations de facturation.',
4654
],

resources/lang/it/services.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
'mailchimp' => [
4242
'description' => 'Mailchimp è un servizio di email marketing che ci permette di inviare email ai nostri clienti. Mailchimp potrebbe raccogliere informazioni personali come nomi, indirizzi e-mail e dati di navigazione.',
4343
],
44+
'microsoft_clarity' => [
45+
'description' => 'Microsoft Clarity è un servizio di analisi che ci consente di raccogliere dati sull\'utilizzo del nostro sito web per migliorarne il funzionamento. Microsoft potrebbe raccogliere informazioni come click, movimenti del mouse, pagine visitate e altri dati comportamentali.',
46+
'cookies' => [
47+
'_clck' => 'Identifica in modo univoco un visitatore per Clarity, per capire se si tratta di un utente ricorrente.',
48+
'_clsk' => 'Collega le pagine visualizzate da un utente in una singola sessione di Clarity.',
49+
'CLID' => ' Identifica in modo univoco i visitatori nei diversi siti che utilizzano Clarity.',
50+
],
51+
],
4452
'paypal' => [
4553
'description' => 'PayPal è un servizio di pagamento che ci consente di accettare pagamenti dai nostri clienti. PayPal potrebbe raccogliere informazioni personali come nomi, indirizzi e-mail e informazioni di fatturazione.',
4654
],
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace Keepsuit\CookieSolution\ServiceFactories\Microsoft;
4+
5+
use Illuminate\Support\Collection;
6+
use Keepsuit\CookieSolution\Cookie;
7+
use Keepsuit\CookieSolution\CookiePurpose;
8+
use Keepsuit\CookieSolution\Service;
9+
use Keepsuit\CookieSolution\ServiceFactories\ServiceFactory;
10+
11+
class MicrosoftClarityServiceFactory extends ServiceFactory
12+
{
13+
public function build(): Service
14+
{
15+
$cookies = Collection::make([
16+
'_clck' => 365,
17+
'_clsk' => 1,
18+
'CLID' => 365,
19+
])->map(function (int $duration, string $name) {
20+
return new Cookie(
21+
name: $name,
22+
purpose: CookiePurpose::STATISTICS,
23+
duration: $duration,
24+
description: __('cookie-solution::services.microsoft_clarity.cookies.'.$name),
25+
);
26+
})->all();
27+
28+
return new Service(
29+
name: 'Microsoft Clarity',
30+
provider: 'Microsoft',
31+
description: __('cookie-solution::services.microsoft_clarity.description'),
32+
privacyPolicyUrl: 'https://www.microsoft.com/privacy/privacystatement',
33+
cookies: $cookies
34+
);
35+
}
36+
}

workbench/app/Providers/WorkbenchServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Keepsuit\CookieSolution\ServiceFactories\Mailchimp\MailchimpServiceFactory;
1818
use Keepsuit\CookieSolution\ServiceFactories\Meta\FacebookPixelServiceFactory;
1919
use Keepsuit\CookieSolution\ServiceFactories\Meta\MetaDataProcessingLocation;
20+
use Keepsuit\CookieSolution\ServiceFactories\Microsoft\MicrosoftClarityServiceFactory;
2021
use Keepsuit\CookieSolution\ServiceFactories\PayPal\PayPalServiceFactory;
2122
use Keepsuit\CookieSolution\ServiceFactories\PostHog\PostHogAnalyticsServiceFactory;
2223
use Keepsuit\CookieSolution\ServiceFactories\PostHog\PostHogDataProcessingLocation;
@@ -39,6 +40,7 @@ public function register(): void
3940
->register(GoogleTagManagerServiceFactory::new()->location(GoogleDataProcessingLocation::IRELAND)->build())
4041
->register(KlarnaServiceFactory::new()->build())
4142
->register(MailchimpServiceFactory::new()->build())
43+
->register(MicrosoftClarityServiceFactory::new()->build())
4244
->register(FacebookPixelServiceFactory::new()->location(MetaDataProcessingLocation::IRELAND)->build())
4345
->register(PayPalServiceFactory::new()->build())
4446
->register(PostHogAnalyticsServiceFactory::new()->location(PostHogDataProcessingLocation::EUROPE)->build())

0 commit comments

Comments
 (0)