Comment

Comment by vklmn

We actually ask to insert a snippet after GA / Segment initialization code.

The algo is a follows: a) check if ga / analytics object is present b) add interceptor c) if the code was fully loaded (not a stup), send "fake" pageview event (which has been already sent), intercept it and send to EN backend only (not the original backend).

Also, we received a pull request that won't require EN code be inserted after GA/Segment. It tries to get window.ga/analytics object. If it doesn't exist, try the same thing in 1 second via setTimeout. We most likely with merge it to master soon

parent vklmn 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton