Hi.
I think we would use this if it were available, even though it would be one more request. to explain our use case:
With no page caching we typically have 1.2 – 1.8 second page generation, wp-rocket reduces this around 100-400ms (but a bit variable, sometimes longer).
We have implemented one post-load ajax request for mini-cart content + geoloate for the same reason we are discussing, so that the page is independent of the visitor and the same cached version can be served to all.
The post-load ajax request takes around 500ms, but is fired when the page is loaded, limiting its impact on performance metrics (important this year with Core Web Vitals).
Additionally, we are using wp-rocket’s delay execution facility so that GTM, a dozen other trackers and some other scripts aren’t executed until there is some interaction from the user (move/scroll/click/key). Perhaps not for everyone but it’s working for us, the performance gain is significant, particularly in google’s strict CWV assessment.
I expect I am underestimating the amount & complexity of data gtm4wp collects and presents, but.. If GTM4WP could load dynamic data in an ajax request I think we would use it. If the output was available through a do_action or do_shortcode that would give a little extra versaility, we could include it in our existing single ajax call.
Not sure if that helps, or if I’m missing some key problem of the issue…
Thanks
G