Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I track which visits have Javascript enabled/disabled? #10509

Open
claudioschneider opened this issue Sep 16, 2016 · 4 comments
Open

How do I track which visits have Javascript enabled/disabled? #10509

claudioschneider opened this issue Sep 16, 2016 · 4 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@claudioschneider
Copy link

is there any possiblity to find out if the visitor of my website has enabled or disabled javascript?

thanks in advance!

cheers

@mackieee
Copy link

mackieee commented Sep 18, 2016

Edit: After a little more googling around; A <noscript> method: http://piwik.org/faq/how-to/#faq_176 that I never knew of! I found this through the Piwik forums, there's a lot more resources there to help you with your answer.

As the server side has way of knowing (Browser setting and not included in the HTTP Headers) and of course, if it was Client side and it was disabled; no chance :)

As a possible workaround, If you were to use Piwik's PHP Server side tracking method; send a Custom variable along with each request to specify if JavaScript is enabled or not. By default it's not; however once the user arrives on the site and sends a successful dummy AJAX Call - you know it's enabled for the request of the session.

@claudioschneider
Copy link
Author

Thank you for your detailed answer.
That should help me :)

Cheers

@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Nov 12, 2016
@mattab mattab modified the milestones: 3.0.0, Mid term Nov 12, 2016
@mattab mattab changed the title Javascript enabled/disabled How do I track which visits have Javascript enabled/disabled? Nov 12, 2016
@mattab
Copy link
Member

mattab commented Nov 12, 2016

It is possible to track JavaScript usage with Piwik using the following technique:

  • create a custom dimension (https://piwik.org/docs/custom-dimensions/) "JavaScript enabled"
  • in the Piwik JS code, set this variable to "yes" eg._paq.push(['setCustomDimension', customDimensionId = 1, "yes"]); (javascript is always enabled when this runs)
  • in the noscript code set the variable to "no". eg. append to the noscript piwik tracker URL piwik.php?....&dimension1=no (javascript is disabled as noscript was triggered) -> assuming you "JavaScript enabled" is customDimensionId = 1

if you use this technique let us know how it goes!

(leaving ticket opened as we could maybe move this into a FAQ or feature it as a useful custom dimension)

@claudioschneider
Copy link
Author

Hi

I've made it on the same way ;)
And it works :)

Thanks for your answer.

Cheers

On 12 Nov 2016, at 08:47, Matthieu Aubry <notifications@github.commailto:notifications@github.com> wrote:

It is possible to track JavaScript usage with Piwik using the following technique:

  • create a custom dimension (https://piwik.org/docs/custom-dimensions/) "JavaScript enabled"
  • in the Piwik JS code, set this variable to "yes" eg._paq.push(['setCustomDimension', customDimensionId = 1, "yes"]); (javascript is always enabled when this runs)
  • in the noscript code set the variable to "no". eg. append to the noscript piwik tracker URL piwik.php?....&dimension1=no (javascript is disabled as noscript was triggered) -> assuming you "JavaScript enabled" is customDimensionId = 1

if you use this technique let us know how it goes!

(leaving ticket opened as we could maybe move this into a FAQ or feature it as a useful custom dimension)

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/10509#issuecomment-260107899, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AP5Km0l8hj8vVhM--Z9nY9o4rTPI7tAsks5q9W8cgaJpZM4J-rxW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants