Let $\mathsf{Top}_*$ be the category of well-based spaces and $\mathsf{TopMon}$ the category of topological monoids. Recall the James construction $\mathcal{J}:\mathsf{Top}_*\to \mathsf{TopMon}$ which is left adjoint to the forgetful functor.
Now let $A\hookrightarrow X$ be a cofibration of based spaces and let $M$ be a topological monoid as well as $f:A\to M$ a based map. I want to “attach” the free topological monoid $\mathcal{J}X$ to $M$ along $\mathcal{J}A$. More precisely, I want to consider the adjoint map $\mathcal{J}A\to M$ and form the pushout of $(\mathcal{J}X\leftarrow \mathcal{J}A\to M)$ in the category $\mathsf{TopMon}$.
Call this pushout $M'$. I am interested in the classifying space $BM'$. The naïve hope would be of course something like $$BM' = \mathrm{hocolim}_{\mathsf{Top}_*}\left(B\mathcal{J} X\leftarrow B\mathcal{J} A\to BM\right),$$ and then one would identify up to homotopy $B\mathcal{J}\simeq \Sigma$, where the occuring map $\Sigma A\to BM$ is just the composition $\Sigma A\to \Sigma M\to BM$ with $\Sigma M\to BM$ being induced by the inclusion $\Delta^1\times M\to |NM|=BM$ of the $1$-simplices (or in other words, $\Sigma M\to BM$ is the adjoint of the group completion $M\to \Omega B M$).
However, I guess that this is too nice to wish for. I found the following paper by Fiedorowicz in which he gives explicit conditions under which the classifying space of a discrete amalgamated monoid is a (homotopy) pushout of classifying spaces.
Is there anything known for the non-discrete case? What would we additionally have to assume for the inclusion $A\hookrightarrow X$ or the attaching map $f:A\to M$ to hold?