Did Segment's "Google Analytics 4 Web" integration just start loading lodash?

86 views Asked by At

Early this morning we started support requests saying our web app was down. Upon closer inspection, it seems the "Google Analytics 4 Web" Segment integration is using lodash, which is conflicting with our use of underscore.

Anyone else seeing this? Do we know if this was a change in Segment's integration? It seems new.

When I load GA4 via GTM (i.e. not use Segment), it doesn't seem to load lodash.

1

There are 1 answers

0
cortfr On

Segment did end up fixing this. They were very quick to respond to it.

Here is the technical explanation from Segment's engineer:

The Lodash library was added to a core action destination npm module in a way where Lodash would attempt to set itself on the global window object. This module is included as part of the GA4 Web destination. We've reverted the change that included Lodash into the build - opting to avoid using it in the future. We're also adding additional CI checks to detect when updates may have side effects on the global object so we can flag them before approving those changes.

So this should no longer be happening, and we confirmed that it is fixed for us.