In which version did Custom Javascript show up?


  • Admin Staff

    @baris said in In which version did Custom Javascript show up?:

    _paq.push(['setTrackerUrl', u+'piwik.php']);

    Did you fix this to be _paq.push(['setTrackerUrl', '//your.piwikurlhere.com/piwik.php']); as well?

    If it doesn't work in custom header/javascript then I don't think it's gonna work in a widget either. You can try putting the same code in a global sidebar widget and test it.



  • @baris Thanks for all of the pointers. The javascript does not seem to work in a Widget, as you deduced, either.

    I'm at a loss as I'm not a JS programmer. I'll just stick with v1.4.5 for a while longer for my production forum. Possibly I will figure something else out.



  • Well I am embarrassed, I figured out the problem! There is no problem with custom javascript or the custom header information. It turns out the nodebb-plugin-ns-twitch-monitor was the problem! The plugin does not seem to work after a certain version of NodeBB and where I had it placed in my widgets must have been causing the custom header code to not load or run properly.

    I am still running v1.4.5 but am moving over to a new server, yes after all of these years. In doing so I have been incrementally stepping through upgrades, 1.4.5 -> 1.5.x -> 1.6.x -> 1.7.x... It was there at the 1.7.x that my custom Piwik (Matomo) code stopped working. I put NodeBB into "dev" mode and saw a number of errors related to the Twitch plugin. I removed the plugin and my analytics code now works fine.

    It is bittersweet as I really like the Twitch plugin on my forum but the plugin stopped working quite some time ago. Twitch changed how their API works and the plugin was never updated to keep up.

    Shouting out to a list of people for closure on this, in case you were all losing sleep on this since May of last year! @baris @julian @Nicolas


Log in to reply
 

Suggested Topics

| |