Since launching a v9.0.2 scaled site, I've seen this warning many times in the logs:
10076 09:52:45 WARN Session with Id xxxxxxx has reached the max page threshold of 50. If you see this message regularly, you should increase configuration parameter MaxPageIndexThreshold to avoid loss of valid data.
My understanding is that there are two potential solutions:
- Increase the
MaxPageIndexThreshold
- Disable tracking of certain pages or API calls to reduce the total amount of page views being logged in Analytics
I want to consider the second solution before increasing MaxPageIndexThreshold
.
Specifically, I want to disable tracking of our custom API calls which don't need to be tracked.
Sitecore has a guide on how to do this, but it seems to only be for those using Sitecore Commerce.
Sitecore also has another guide, but it only works for the exclusion of files (rather than routes). I have confirmed that this is true. No route support.
This SO answer also makes a recommendation, but the code repo linked in that answer looks like it could use some improvements and more testing.
Here are a few more resources I've looked at:
- https://kylekingsbury.com/reaching-the-max-pages-viewed-threshold-for-an-xdb-session/
- https://blogs.perficient.com/2015/10/20/xdb-tracking-the-untrackable-part-2/
- Making Sitecore ignore the call to an API, while manually adding a page to the tracker
Am I missing something? Is there a better way to do this?