News for hackers. Stuff that matters.
Re:Reliably Send an HTTP Request as a User Leaves a Page by justWells on Saturday April 09, 2022 @03:01AM (#30965804)
I genuinely don’t understand why you wouldn’t use a product like Heap or Amplitude to do this type of tracking
Re:Reliably Send an HTTP Request as a User Leaves a Page by bigyikes on Saturday April 09, 2022 @03:12AM (#30965844)
Even if you use Amplitude, this could still be helpful information. I’m not sure what kind of APIs Amplitude provides, but we use it at my job. In my work, the details of Amplitude are abstracted away such that this information is still highly relevant.

At a minimum, this kind of information is relevant to the people creating products like Heap or Amplitude.

Re:Reliably Send an HTTP Request as a User Leaves a Page by justWells on Saturday April 09, 2022 @12:07PM (#30969222)
You can just pass props to events like any other object data structure.

I work at Heap and am just curious why you would still want to implement manually coded tracking.

Re:Reliably Send an HTTP Request as a User Leaves a Page by bigyikes on Monday April 18, 2022 @01:29AM (#31067731)
At my company, the analytics APIs are provided by a platform team.

I think there’s some utility in a company owning an abstraction away from a third party.

Supposing if Amplitude (or Heap) were to ever go under, or if we were to want to change Analytics providers for whatever reason, it would be extremely helpful if the code didn’t depend directly on these third parties.

On a smaller app, I would mostly likely directly use the Heap or Amplitude APIs.

(Late reply, apologies)

Re:Reliably Send an HTTP Request as a User Leaves a Page by zmxz on Saturday April 09, 2022 @03:34AM (#30965945)
UBlock blocks Amplitude. Nextdns blocks Amplitude.

You get incomplete, inaccurate data.

It's also fun and good for curiosity to do something on your own rathern than rely on a service and never think about what browsers can do.

Re:Reliably Send an HTTP Request as a User Leaves a Page by Gigachad on Saturday April 09, 2022 @03:52AM (#30966032)
Most users don’t use analytics blockers. You get more than enough useful data from these users.
Re:Reliably Send an HTTP Request as a User Leaves a Page by makapuf on Saturday April 09, 2022 @04:29AM (#30966212)
100% of people asked answer surveys. They're perfectly reliable.
Re:Reliably Send an HTTP Request as a User Leaves a Page by Gigachad on Saturday April 09, 2022 @05:10AM (#30966407)
Yes, surveys are generally regarded to be good enough.
Re:Reliably Send an HTTP Request as a User Leaves a Page by XCSme on Saturday April 09, 2022 @09:17AM (#30967803)
Is this related to the article? How do you track time spend on page for a single page-visit using Heap? Don't they have to use a similar mechanism as described in the article?
Re:Reliably Send an HTTP Request as a User Leaves a Page by justWells on Saturday April 09, 2022 @12:08PM (#30969240)
That’s a tougher one. But you can just send the app time stamps and do a bit of math between events.