This indeed turned out to be a problem with my own configuration in Nginx. 
Google Analytics in Arches works like a charm!

I have this configuration in Nginx: 
add_header Content-Security-Policy "script-src 'self' 'unsafe-inline' 
'unsafe-eval' example.com $host; object-src 'self' $host; worker-src 'self' 
$host blob:; frame-ancestors 'self' https://example.com $host;";

And I had to add www.google-analytics.com to the 'script-src' bit in order 
for the ga script to load in the browser.



On Tuesday, 27 November 2018 18:42:55 UTC+1, Ben O'Steen wrote:
>
> Thanks for the heads up. 
>
> On Tue, 27 Nov 2018 at 09:41, Adam Cox <[email protected] <javascript:>> 
> wrote:
>
>> Just an FYI to both of you, there was an issue with this a long time ago 
>> which we fixed and is now closed, 
>> https://github.com/archesproject/arches/issues/2942, but there's always 
>> the possibility that something unforeseen has popped up, post bugfix.
>>
>> Adam
>>
>> On Tue, Nov 27, 2018 at 10:29 AM Ben O'Steen <[email protected] 
>> <javascript:>> wrote:
>>
>>> Did this fix it? I'm also interested in adding analytics to Arches!
>>>
>>> Ben
>>>
>>>
>>> On Sun, 25 Nov 2018 at 12:17, Vincent Meijer <[email protected] 
>>> <javascript:>> wrote:
>>>
>>>> Found the potential culprit: I need to add www.google-analytics.com to 
>>>> my Content Security Policy ('script-src') directive.
>>>> I'll update here once I am able to test this again.
>>>>
>>>>
>>>> On Sunday, 25 November 2018 11:17:38 UTC+1, Vincent Meijer wrote:
>>>>>
>>>>> Has anyone used the Google Analytics feature built into Arches?
>>>>>
>>>>> It doesn't seem to be working for me. I created a GA account and 
>>>>> pasted my tracking id in the 'Google Analytics Key' field in Arches 
>>>>> System 
>>>>> Settings.
>>>>> However, no traffic is being recorded, according to the GA website.
>>>>>
>>>>> Also, for some reason the analytics.js snippet is only present on 
>>>>> about every other page refresh (50% of the time), which is odd by itself.
>>>>>   
>>>>>
>>>>> [image: ga.png]
>>>>>
>>>>> Thanks!
>>>>> Vincent
>>>>>
>>>> -- 
>>>> -- To post, send email to [email protected] <javascript:>. To 
>>>> unsubscribe, send email to [email protected] 
>>>> <javascript:>. For more information, visit 
>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Arches Project" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected] <javascript:>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>>> -- To post, send email to [email protected] <javascript:>. To 
>>> unsubscribe, send email to [email protected] 
>>> <javascript:>. For more information, visit 
>>> https://groups.google.com/d/forum/archesproject?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Arches Project" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to