We want to send the gaClientId with our GOV.UK analytics payload, but
due to asynchronous loading we may not have actually fetched it from
the GA library by the time sendToTracker is called.
If GA is enabled on this page, we now wrap the call to sendData in
the “ga ready” callback function and make sure we set the clientId
first.
We want to send the
gaClientId
with our GOV.UK analytics payload, but due to asynchronous loading we may not have actually fetched it from the GA library by the timesendToTracker
is called.If GA is enabled on this page, we now wrap the call to
sendData
in the “ga ready” callback function and make sure we set the clientId first.