This is a revision of my previous answer, which was not accurate enough.
Let $f,g:\mathbb{R}^n\to\mathbb{R}^n$ be two continuously differentiable functions, and let $\langle\cdot,\cdot\rangle$ be some inner product. The Leibniz rule says that the directional derivative of $\langle f,g\rangle$ at a point $x$ in the direction $u$ is given by$$d\langle f,g\rangle_x(u)=\langle df_x(u),g(x)\rangle+\langle f(x),dg_x(u)\rangle.$$In other words,$$d\langle f,g\rangle_x=\langle df_x(\cdot),g(x)\rangle+\langle f(x),dg_x(\cdot)\rangle.$$This holds for any inner product. I thank fretty for the comment.
In our specific case, the question is solved by taking the function $g$ to be constant.