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

Screen resolution unknown when first tracking event is sent from backend #12643

Closed
make-it-git opened this issue Mar 23, 2018 · 3 comments
Closed
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@make-it-git
Copy link

I have tracking code in php and js.

  1. User opens page
  2. Backend sends tracking request (page is not loaded yet for user)
  3. Page is loaded and piwik.js sends screen resolution via res parameter
  4. Visitor's profile shows screen resolution as Unknown

If I remove step 2, so first tracking request goes from frontend it works fine, screen resolution is presented in visitor's profile.

Is it intended behaviour? Can I fix it? Should backend tracking request be executed after frontend tracking request for correct metrics?

@sgiehl
Copy link
Member

sgiehl commented Mar 23, 2018

Why are you making a "backend tracking" request at all? Is it to not miss any tracking requests that might be blocked by ad blockers or similar?

@make-it-git
Copy link
Author

Yes. This request is generated on initial page load.
Is this not fixable by design and first request must be done on frontend?
@sgiehl

@sgiehl
Copy link
Member

sgiehl commented Mar 23, 2018

It's by design that only the first tracked request is able to set the resolution. It requires some code changes to change that behaviour

Btw. Mixing both tracking methods might result in duplicate page views.

@sgiehl sgiehl added the answered For when a question was asked and we referred to forum or answered it. label Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants