Applicationinsights-js: appInsights with jquery-pjax

Created on 11 Jul 2016  路  4Comments  路  Source: microsoft/ApplicationInsights-JS

What would be the best way to use appInsights with jquery-pjax?

Someone tell if the approach below would have any side effects?

$(document).on('pjax:complete', function() { appInsights.trackPageView(); });

question

All 4 comments

I'm not familiar with jquery-pjax. Let me look into this and get back to you.

@raphaelm22 Your proposal looks correct to me (without actually having tried it). I think it is logically similar to making jQuery load calls and pjax overlaps that functionality.

@dnduffy But the portal Azure in application insights, the indicators (the grid requests grouped by "Client performance page name") are not changed. I believe appInsights is counting otherwise, not as page view.

thank you

I haven't forgotten about this, I just haven't had a chance to investigate it yet.

Was this page helpful?
0 / 5 - 0 ratings