Let us assume that
\begin{equation} f(X)=\mbox{tr}\left(XCX^TXCX^T\right), \end{equation}
in which $C\in\mathbb{R}^{r\times r}$ is a symmetric matrix, and $X \in \mathbb{R}^{r'\times r}$. From the Page 13 of the book The Matrix Cookbook, we know that
\begin{equation} \frac{\partial f}{\partial X}=4CXX^TCX. \end{equation}
Now, let us consider the following function:
\begin{equation} g(X)=\mbox{tr}\left(BXCX^TB^TBXCX^TB^T\right), \end{equation}
where $B\in\mathbb{R}^{m\times r'}$. What is the derivative of $g$ with respect to $X$ (i.e., $\frac{\partial g}{\partial X}$)?
Here's yet another way. Define the derivative $Df(X)$ of $f$ at $X$ as the linear map such that for any matrix $H$ proportional to some $h$ you have $$f(X+H)=f(X)+Df(X)(H)+O(h^2)$$ In particular, you can calculate $Df(X)(H)$ as $$Df(X)(H)=f(X+H)-f(X)$$ where you can suppose that $H$ is proportional to a symbol $h$ such that $h^2=0$. Hence $D$ satisfies $$\begin{align} D(f\circ g)(X)(H) &=f(g(X+H))-f(g(X)) \\ &=f(g(X)+Dg(X)(H))-f(g(X))\\ &=f(g(X))+Df(g(X))(Dg(X)(H))-f(g(X))\\ &=[Df(g(X))\circ Dg(X)](H) \end{align}$$ so that $$D(f\circ g)(X)=Df(g(X))\circ Dg(X)$$
Now your function $g$ can be written as $$g(X)=v(u(z(X)))$$ where $$z(X)=BX$$ $$u(Y)=YCY^T$$ $$v(W)=W:W^T$$ and $A:B=\mathrm{tr}(A^TB)=\mathrm{tr}(AB^T)$ satisfies $A:B=B:A=B^T:A^T$ as in greg's answer. So it suffices to calculate $Dz(X)$, $Du(Y)$ and $Dv(W)$. Again, assuming $H$ is proportional to a symbol $h$ where $h^2=0$, we have $$Dz(X)(H)=z(X+H)-z(X)=B(X+H)-BX=BH$$ $$\begin{align} Du(Y)(H) &=u(Y+H)-u(Y) \\ &= (Y+H)C(Y+H)^T - YCY^T \\ &= YCH^T + HCY^T \\ &= 2YCH^T \end{align}$$ since $C=C^T$. Also $$\begin{align} Dv(W)(H) &= v(W+H)-v(Y) \\ &= (W+H):(W+H)^T - W:W^T \\ &= W:H^T + H:W^T \\ &= 2W:H^T \end{align}$$ Hence $$\begin{align} Dg(X)(H) &= D(v\circ u\circ z)(X)(H) \\ &= [Dv(u(z(X))) \circ D(u\circ z)(X)](H) \\ &= [Dv(u(z(X))) \circ Du(z(X)) \circ Dz(X)](H) \\ &= [Dv(u(z(X))) \circ Du(z(X))](BH) \\ &= [Dv(u(z(X)))] (2z(X)C(BH)^T) \\ &= 2u(z(X))):(2z(X)C(BH)^T)^T \\ &= 4u(BX):(BXC(BH)^T)^T \\ &= 4[BXC(BX)^T]:(BXC(BH)^T)^T \\ &= 4[BXC(BX)^T]:[BHCX^TB^T] \\ &= 4[B^TBXC(BX)^T]:[HCX^TB^T] \\ &= 4[B^TBXC(BX)^T(CX^TB^T)^T]:H \\ &= 4[B^TBXCX^TB^TBXC]:H \end{align}$$ In particular, for $B=I$ you get $$Df(X)(H) = 4[XCX^TXC]:H$$
Notice that what the matrix cookbook actually says is $$\frac{\partial}{\partial X}\mathrm{tr}(X^TCXX^TCX) = 4CXX^TCX$$ but the left hand side is $(\partial/\partial X)f(X^T)$, so it's not exactly what you have.