Let $\mathbb{S}^1$ be the unit circle. Suppose $g:\mathbb{N}\to\mathbb{S}^1$ is a completely multiplicative function such that $$\sum_{\substack{p\in\mathbb{P}\\ g(p)\neq 1}}\frac{1}{p}<\infty.$$ Determine $$\lim_{N\to\infty}\frac{1}{N}\sum_{n=1}^N g(n).$$
First, suppose that $g(p)=1$ for all $p\in\mathbb{P}\setminus\{q\}$. WLOG assume that $q\mid N$. We have that $$ \frac{1}{N}\sum_{n=1}^N g(n) = \frac{1}{N}\left(g(q)\sum_{n\leq N/q}g(n) + \frac{N(q-1)}{q}\right)\\ = \frac{g(q)}{q}\frac{1}{N/q}\sum_{n=1}^{N/q} g(n) + \frac{q-1}{q}. $$ Supposing the limit $L:=\lim_{N\to\infty}\frac{1}{N}\sum_{n=1}^N g(n)$ exists (how can I show this?), we rewrite the above and get that $$ L = \frac{g(q)}{q}L + \frac{q-1}{q} \Leftrightarrow L = 1-\frac{1-g(q)}{q-g(q)}. $$ Now, supposing that $g(p)=1$ for all $p\in\mathbb{P}\setminus\{p_1,\dots,p_k\}$ and using the same technique, I got that
$$L=\frac{1-\sum_{i=1}^k\frac{1}{p_i}}{1-\sum_{i=1}^k\frac{g(p_i)}{p_i}}.$$
Trying to extend this result to the original problem, the numerator poses no obstacle, since $\sum_{\substack{p\in\mathbb{P}\\ g(p)\neq 1}}\frac{1}{p}<\infty$. On the other hand, I don't know what to do with the denominator. Is there a way to write the above in another way, maybe using a product? Or should I derive the formula by another means?