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

track_links & track_clicks didn't track dynamic added dom elements #11

Closed
jianglinchun opened this issue Sep 6, 2016 · 7 comments
Closed

Comments

@jianglinchun
Copy link

If we had a ajax request and append some dom elements to the document.
The track_links & track_clicks will not be triggered on those newly added elements.

@ar2rsawseen
Copy link
Member

Currently you can call track_links or track_clicks method and provide parent element of changed content for example to add those new elements to registry

But I will try to think on better solution

@ar2rsawseen
Copy link
Member

Are you sure track_clicks is not working, from the code it should work, cause it listens to bubbled evens on the document level

@jianglinchun
Copy link
Author

tested under chrome many times. Pls check.

@ar2rsawseen
Copy link
Member

This issue should be fixed on development branch by c324f3d

Note if you want to try development branch, then it currently does not parse user agent and does not send all metrics to server, metrics are post filled by web plugin on server side (which require some modifications on server)

Will close issue after release, when development branch is merged

@jianglinchun
Copy link
Author

I'd review the fix. And I found that closest was use to fix this issues. Please make sure compatible problems.

http://stackoverflow.com/questions/18663941/finding-closest-element-without-jquery

Btw: countly may focus on App statics tracking and analytic. But web/wap/h5 still a important entrance.

@jianglinchun
Copy link
Author

I had test the latest branch and it works.

@ar2rsawseen
Copy link
Member

Yes, there is a polyfil for when it is not available:
684e415

So it should be compatible with older systems too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants