Delaying initial Matomo call


#1

Hi,

Is there a way of delaying the initial Matomo call when a session starts without slowing down the whole application?

We have some data that loads asynchronously when the session begins, and some of this data we want sent up on the initial call that starts the session. However, sometimes the matomo call is made first before all the data loads, and this data shows up as “Value Not Defined” or “null”.

We don’t want to add sleep code that will delay Matomo from starting the session, but we do want to ensure that this data is sent up. Is there a good way of accomplishing this?