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

Dynamic loaded content not tracked #18249

Open
cdalexndr opened this issue Oct 31, 2021 · 2 comments
Open

Dynamic loaded content not tracked #18249

cdalexndr opened this issue Oct 31, 2021 · 2 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@cdalexndr
Copy link

Expected Behavior

Track content impression/interraction.

Current Behavior

Impression/interraction not tracked.

Possible Solution

Listen DOM changes.

Steps to Reproduce (for Bugs)

  1. Load html using ajax containing a <select data-track-content data-content-name="name" data-content-piece="piece">
  2. Put the loaded html inside an element using Jquery.html() method
  3. After load, there is no network activity to notify content tracking

Note that if I put the select directly in my html it works as expected. Only problem is with dynamic loading.

Context

Your Environment

  • Matomo Version: 4.5.0
  • PHP Version: PHP 7.4.25 (cli) (built: Oct 22 2021 18:03:01) ( NTS )
  • Server Operating System: docker image matomo:fpm-alpine
  • Additionally installed plugins:
  • Browser: Firefox
  • Operating System: Win10
@cdalexndr cdalexndr added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Oct 31, 2021
@cdalexndr
Copy link
Author

Found workaround in FAQ

@tsteur tsteur added worksforme The issue cannot be reproduced and things work as intended. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. worksforme The issue cannot be reproduced and things work as intended. labels Nov 2, 2021
@tsteur
Copy link
Member

tsteur commented Nov 2, 2021

I'll keep this issue open so we can eventually improve this and detect these elements automatically. Thanks for creating this issue @cdalexndr

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