Top 10 provides various tracking methods to record post views efficiently. Each tracker type has unique benefits and considerations. This guide explains the different types of trackers available in the Top 10 WordPress plugin to help you select the best option for your site.
Selecting the Tracker
The tracker can be set in the Top 10 > Settings > Counter/Tracker. Scroll down to tracker settings and select the Tracker type.
Tracker Types
- REST API-Based Tracker: Utilises the WordPress REST API to record visits using a custom endpoint
top-10/v1/tracker
. Offers flexibility and can be used directly in your web app. This will not work if REST API requests are blocked on your website. - Query Variable-Based Tracker: Records visits using query variables appended to URLs. Simple and straightforward implementation and should work with most sites.
- Ajaxurl-Based Tracker: Leverages the built-in
admin-ajax.php
file to process tracking requests. A good alternative to the Query Variable-base tracker. - Fast Tracker (Pro only): Employs an external dynamic JavaScript file for optimized tracking performance. Significantly improves tracking speed as it loads the minimal WordPress environment. Perfect for high-traffic websites or any website!
Choosing the Right Tracking Method
The optimal tracking method depends on your website’s specific requirements. Consider the following factors:
- Website size and traffic: Fast Tracker is the most suitable for large/high-traffic due to their performance advantages.
- Plugin compatibility: Ensure the chosen tracking method is compatible with other plugins you’re using. If any plugin or your hosting blocks access to the Fast Tracker file, then you’ll need to sure you whitelist the
/wp-content/plugins/top-10-pro/includes/pro/fast-tracker-js.php
.
Additional Tips
- Test and monitor: Experiment with different tracking methods to determine the best performance for your website.
- Consider caching: Implement caching mechanisms to optimise tracking speed and reduce server load.
- Regularly review and update: Stay updated with the latest Top 10 version and best practices.
By understanding the different tracking methods available in Top 10, you can make an informed decision and ensure accurate and efficient post view tracking on your WordPress website.