• Hi Ajay,
    For another issue I took a liberty of opening another thread. Currently top-10-tracker.js is only included on the pages where the tracker runs. While normally it makes sense, it is not helpful if you aggregate all js together. In such case you end up with two different aggregated js files – one with top-10-tracker.js and the other without. It doesn’t make much sense as the user has to download two different aggregated js – one with top-10-tracker.js and the other without.
    The ideal solution would to have top-10-tracker.js included everywhere, but of course void on some pages. The behavior can depend on the presence of the inline ajax top-10 url (ajax_tptn_tracker). The inline data with ajax_tptn_tracker can be included only on pages that have to be tracked, while top-10-tracker.js would be included everywhere, to improve caching.

    A side issue – is it possible to rename top-10-tracker.js to top-10-tracker.min.js? The file is minified, but some plugins think it is not (because of the name) and force minifying it which is completely pointless and just burns CPU.

    Thank you in advance for looking into that. I would love to have filters that would let me change where top-10-tracker.js is loaded.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ajay

    (@ajay)

    New issue created for renaming the file: https://github.com/WebberZone/top-10/issues/71

    I like the idea of loading the js on all pages. Let me see what I can do.

    I’ve also debated with the idea of trying to track all pages on the site which could serve the purpose. Yet to work out the logic behind where to save this without a massive database change!.

    What plugin are you using for the aggregation of js?

    Thread Starter Grzegorz.Janoszka

    (@grzegorzjanoszka)

    Ajay, there is certainly a point in tracking the main page of the blog. As a configuration settings one can enable tracking categories or sth else.

    For aggregation I use autoptimize – I’m very happy with it.

    hmm, you could try returning false to the autoptimize_filter_js_unmovable-filter and then add your top-10 script to the domovelast array using the autoptimize_filter_js_movelast filter?

    but do take into account that;
    a) this might break stuff
    b) the move(last) logic is old, off as per the filter and largely untested ??

    sorry, replied in the wrong topic ??

    • This reply was modified 5 years, 10 months ago by Optimizing Matters. Reason: wrong tab, wrong topic :-)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘top-10-tracker.js loaded always’ is closed to new replies.