Track shiny app usage built on shinydashboard

I am familiar with articles like this: Shiny - Shiny App Usage Tracking

This code that would go in fluidPage doesn't work inside of shinydashboard::dashboardPage. If I place it inside of dashboardPage I get an unused argument error, so I knew I needed to put it in something more analogous to what you did here. So I tried inside of dashboardHeader> and I get this error: Error in FUN(X[[i]], ...) : Expected tag to be of type li .

Will this work with shinydashboard?

I found the answer here: r - Has anyone had success using Matomo for Shiny usage tracking with a shinydashboard app? - Stack Overflow

I was able to deploy, cannot yet confirm if the data shows up in hotjar.