Sometimes the the order parameter is defined as the thermal average of a spatially varying field $\textbf{m}(\textbf{x})$ i.e., $\langle\textbf{m}(\textbf{x})\rangle$.
Sometimes the order parameter (density) is defined as the spatial integral $\frac{\textbf{M}}{V}=\frac{1}{V}\int\textbf{m}(\textbf{x}) d^3\textbf{x}$ where $\textbf{m}(\textbf{x})$ is supposed to be some coarse-grained microscopic variable such as spin.
Which one is the correct and most general definition of the order parameter?
A note: Chaikin and Lubensky's book says that when $\textbf{m}(\textbf{x})$ is independent of $\textbf{x}$, the order parameter is given by $$\langle\textbf{m}(\textbf{x})\rangle=\frac{\textbf{M}}{V}$$ where the left hand side is thermal average and right hand side is defined by the the spatial integral expression. The definitions will be consistent with each other if in the integral expression $\textbf{m}(\textbf{x})$ is actually $\langle\textbf{m}(\textbf{x})\rangle$.