Background
A projective representation $V_g\in \mathrm{GL}_n(\mathbb{C})$ of a group $G$ is characterized by $V_gV_h=\omega(g,h)V_h$, where $\omega(g,h)\in\mathrm{U}(1)$ is a 2-cocycle. Changing the phase of each $V_g$ by $\phi_g$ induces an equivalence relation $$ \omega(g,h) \sim \omega(g,h)\phi_g\phi_h/\phi_{gh}\ ; $$ the resulting equivalence classes of $\omega$'s are labelled by elements of the second cohomology group $\mathrm{H}^2(G,\mathrm{U}(1))$.
Question
Under which condition on the group $G$ is it possible to identify the equivalence class in $\mathrm{H}^2(G,\mathrm{U}(1))$ of the 2-cocycle characterizing a projective representation $V_g$ from a (finite number of) quantities of the form $$ \mathrm{tr}[\tilde V_g\tilde V_h \tilde V_k\cdots]\ , $$ where $\tilde V_g$ can be either $V_g$ or $V_g^\dagger$?
Example
Let me give an example to illustrate what I am looking for. Consider $G=\mathrm{SO(3)}$; here, $\mathrm{H}^2(G,\mathrm{U}(1))=\mathbb{Z}_2$, corresponding to integer and half-integer spin representations, respectively. If we denote by $x\in G$ a rotation about the $x$ axis by $\pi$, and correspondingly for $y$ and $z$, we have that $$ \mathrm{tr}[V_xV_zV_x^\dagger V_z^\dagger] $$ is $+1$ for integer spin and $-1$ for half-integer spin representations. Alternatively, we can also compute $$ \mathrm{tr}[V_xV_yV_z]\mathrm{tr}[V_x^\dagger V_y^\dagger V_z^\dagger] $$ with the same outcome. (Note that both these quantities are "gauge-invariant" -- they do not depend on the choice of the phase $\phi_g$ -- as each $V_g$ appears together with $V_g^\dagger$.)
Comments
It seems to me that such a way to identify the element in $\mathrm{H}^2(G,\mathrm{U}(1))=\mathbb{Z}_2$ associated to a projective representation should exist for any sufficiently "nice" groups (finite groups and compact Lie groups?), but I have only found the $\mathrm{SO}(3)$ (or $D_2$, which is here equivalent) example discussed in the literature. Yet, I would think that this has been studied previously.
Clearly, the quantity in each trace should be proportional to the identity, as it must not depend on the choice of basis. Also, by choosing an appropriate gauge for $\omega$ s.th.\ $\omega(g,g^{-1}=1$, the use of $V_g^\dagger$ becomes unnecessary.
It seems that for finite groups, one could prove this by using the fact that inequivalent projective representations have non-isomorphic central extensions: Given two non-isomorphic central extensions, start building an isomorphism between them by arbitrarily identifying elements of the two central extensions which are mapped to the same $g$. This will eventually lead to a contradiction, and it seems that this contradiction can be expressed in terms of products of group elements which give the identity, but have a different phase in the central extension associated with them.