|
|
|
|
|
by codezero
2142 days ago
|
|
Can't tell from the docs, but how do you deal with "stubbed" events that are triggered before segment/GA loads? Are you able to do anything to make sure your snippet loads fully before other third party scripts that might "do work"? I guess put more simply, do you need to do work when implementing to make sure you don't miss any of the existing events being captured, or does this rely on the same developer implementing all three? |
|
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