Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125895 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 897841A00BD for ; Sat, 2 Nov 2024 13:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1730553350; bh=MEZwTdD4FEK7EdTT9P3cSlaX7gT+7faDEZOUcCpBOEc=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Chkv6Bo5AIV6gppawZ07RHEL3b+IObZ3nCL0tSiQNh5/sOXRe8OF2F6UpC/AXe2KF J2Hh7PXi0kX3auaIVCrgk7fL5KaOch5PpQ0WSZt8oTpfcD/zwyJuqNhgq0dSFBsoeB HjgUWAZv4kHmWPLq5O/zt1ND0O31CzPxhhZVCdcQGHWcMfxO9j2S00ZTjcGQYV7WHY DONlKYAs6WjvvheSNt7lmKWW5eBRFOl77sG7SSIbsESkfxzSvhEKOwd+nfhSU9ghX4 J6z9vB/IIjdC5OTnJUJKUO8f4I60DL/OFftM38mZa/gsUPA5On3jABOOszsvmvKEWU BjmXr8ztprglw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E3890180004 for ; Sat, 2 Nov 2024 13:15:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b4-smtp.messagingengine.com (fhigh-b4-smtp.messagingengine.com [202.12.124.155]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 2 Nov 2024 13:15:48 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id B34E52540085 for ; Sat, 2 Nov 2024 09:13:17 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-01.internal (MEProxy); Sat, 02 Nov 2024 09:13:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1730553197; x=1730639597; bh=+arv/RwMvW pkZLoXQRm6rYYcUiGTW8mLXRiO4X9Ifik=; b=MUshHIl9ZrhNQ5NPOQroOxjW6l 6ILVyaZiAO/DhmC7Gi8VeYBVpqbtLFum2fowC0X0YkvnkSBXL4nK+VPivxtC7mxb tlLDZZCqO6pY51g0KrOL2bHOrJYsLxXKJVDw/FX/aSaC2qQU/kNBXIGbTZbP0XTz w/sIp+GN5N6bR76eFZplUR7TA+OzkDpC13USFDxUyLwrfUIe5QWMMnHTlPyD/oeT N9ZreCLA8ejkKThMRQ7GDf1VDbx8x373Wc+oQdMg/kZ8V3KjxvJnDuf7Ysnr7yCo 0TK74ncn0QcIseoiiEAV7uk+043JUpG9fFrF2lYTW7r1o2J14nxexk8SnBwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1730553197; x=1730639597; bh=+arv/RwMvWpkZLoXQRm6rYYcUiGTW8mLXRi O4X9Ifik=; b=GBXXESKX4RpRkJW81P5bkiv8tPnkmRPC+p5OeujMujiTAOKP+Gy lPG12PLhAfaCzs2WwxEpKaBioXrJoMgzfKbwTiawESN3E7p+5KnbscnzHNHUFVM0 YHVMfsqVKt1Jm5d1/rbveIO32l7S+BsVbyXxbO58V0OLlXkg/KywPqLd2Mj0rg7H LVgxgA7Tt1J6HHh26P4r10xC+ZERyscGijOuN6JZ5mHLKRoDSICUzjs/YuvQWshL S14vV3YprC/D1isOKhOpY2NzyNUbLdFVT9opd21s55RoG2be5BQVpvugE9HoANcU g26yufuk+6cQBX+8YBCXmfKjF5n8bckipHQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeluddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcu oehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgvrhhnpeelkeehtd fgfefhleeilefggeeihfekvdelfeejtdfflefhheehfffgudetuddutdenucffohhmrghi nhepphhhphdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehrohgssegsohhtthhlvggurdgtohguvghspdhnsggprhgtphhtthhopedu pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsth hsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 382F1780068; Sat, 2 Nov 2024 09:13:17 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sat, 02 Nov 2024 14:12:00 +0100 To: internals@lists.php.net Message-ID: <513d98d2-3cb8-40d9-a428-664f153fa3bd@app.fastmail.com> In-Reply-To: <2011a2ec-e7e1-41b3-b429-8b39b5437355@jnvsor.net> References: <55320aad-758a-4d06-b1bd-3eac2b5a5f71@app.fastmail.com> <2011a2ec-e7e1-41b3-b429-8b39b5437355@jnvsor.net> Subject: Re: [PHP-DEV] [RFC] PHP.net analytics Content-Type: multipart/alternative; boundary=cc83e26f164e432c9ab738621148a9f3 From: rob@bottled.codes ("Rob Landers") --cc83e26f164e432c9ab738621148a9f3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, Nov 2, 2024, at 00:54, Jonathan Vollebregt wrote: > On 11/2/24 12:10 AM, Bob Weinand wrote: > > What percentage of users get to the docs through direct links v= s=20 > > the home page > >=20 > > That's something you can generally infer from server logs - was the = home=20 > > page accessed from that IP right before another page was opened? It'= s=20 > > not as accurate, but for a general understanding of orders of magnit= ude=20 > > it's good enough. >=20 > Even better: If we're talking about internal navigation you can check=20 > the referrer header and know for sure, since the docs don't add=20 > rel=3Dnoreferrer on links or anything. >=20 > You shouldn't need server logs _or_ client side JS. A lot of this=20 > tracking stuff could be done by just putting down a proxy or shim that=20 > checks request headers. It looks like matomo offers exactly this via=20 > matomo/matomo-php-tracker. >=20 > I second bob's general sentiment: There's no need for client side trac= king. >=20 Further, most (all?) devs I know generally tend to use pi-holes and othe= r tracking blockers. Devs are notoriously hard people to track via clien= t-side analytics. If we went with a client side solution, I would hope t= hat we use a dedicated domain for ingestion so that this tracking can be= easily blocked. It will still be blocked, but some people would rather = block the entire domain (e.g., go to other mirrors/sites with the docume= ntation) than be tracked. For the case of whether comments are viewed via server-side, you could a= lways load the comments div async once the scroll position goes past a c= ertain point, and inject them into the dom (see: htmx). This has really = crappy usability, but works and might create a faster page load for page= s with lots of comments. For people not using javascript, a simple butto= n to reload the page with comments (`?comments=3D1`?) should be enough a= nd provide the desired analytics as well. =E2=80=94 Rob --cc83e26f164e432c9ab738621148a9f3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Sat, Nov 2, = 2024, at 00:54, Jonathan Vollebregt wrote:
On 11/2/24 12:10 AM, Bob Weinand wrote:<= br>
>      What percentage of users get= to the docs through direct links vs 
> the home p= age

> That's something you can= generally infer from server logs - was the home 
>= ; page accessed from that IP right before another page was opened? It's&= nbsp;
> not as accurate, but for a general understandin= g of orders of magnitude 
> it's good enough.
<= /div>

Even better: If we're talking about internal na= vigation you can check 
the referrer header and know = for sure, since the docs don't add 
rel=3Dnoreferrer = on links or anything.

You shouldn't need se= rver logs _or_ client side JS. A lot of this 
trackin= g stuff could be done by just putting down a proxy or shim that 
checks request headers. It looks like matomo offers exactly = this via 
matomo/matomo-php-tracker.
I second bob's general sentiment: There's no need for clien= t side tracking.


Further, most (all?) devs I know generally tend to use pi-holes and ot= her tracking blockers. Devs are notoriously hard people to track via cli= ent-side analytics. If we went with a client side solution, I would hope= that we use a dedicated domain for ingestion so that this tracking can = be easily blocked. It will still be blocked, but some people would rathe= r block the entire domain (e.g., go to other mirrors/sites with the docu= mentation) than be tracked.

For the case of= whether comments are viewed via server-side, you could always load the = comments div async once the scroll position goes past a certain point, a= nd inject them into the dom (see: htmx). This has really crappy usabilit= y, but works and might create a faster page load for pages with lots of = comments. For people not using javascript, a simple button to reload the= page with comments (`?comments=3D1`?) should be enough and provide the = desired analytics as well.

=E2=80=94 Rob
--cc83e26f164e432c9ab738621148a9f3--