nodebb-plugin-google-analytics: Where does the Google code get loaded (to make Piwik better)?

NodeBB Plugins
  • For those of you keeping score I worked out getting my Piwik (website analytics) javascript installed onto my forum. I also have the Google Analytics plugin installed. The Google Analytics tracking is doing a better job than the Piwik is. Piwik isn't capturing all of the traffic. For example it never seems to see the activity when someone registers (/register url) but Google does see it.

    I have my Piwik javascript in the Appearance > Custom HTML & CSS > Custom Header area. Where is the the Google Analytics javascript? If I navigate to one of my forum pages and look at the page source I see my Piwik javascript but not the Google javascript. That leads me to think the GA js is being side-loaded and is possibly more efficient that way then using the header in html.

    What I'd like to test is to load my custom Piwik javascript in the file that loads the GA javascript to see if Piwik then catches more of the site activity (like Google seems to.)

    Thank you.

  • @rod it's a plugin, so the code will be included in nodebb.min.js

  • @pichalite I found the file in /public. Is that file autogenerated each time Nodebb is started, reloaded or restarted?

  • @pichalite Would you happen to know where I would find the code from the plugin that gets included in nodebb.min.js? I'd like to see if I could drop my Piwik javascript in there to get rolled up into nodebb.min.js as well.

  • I may have found it. node_modules/nodebb-plugin-google-analytics/lib/client.js looks promising. But ohhzzmyyygeez wtf. I don't know how all of that constructs the js call for GA.


Suggested Topics


  • 0 Votes
    2 Posts
    421 Views

    I don't believe so... the slack plugin (which I only have a brief recollection of) connects to slack directly, and can't be customised in the admin panel.

    You'd probably want to create your own plugin with integration into NodeRed (or reach out to us for a quote for a similar plugin)

  • Create a plugin!

    NodeBB Plugins
    0 Votes
    4 Posts
    2k Views

    @yariplus Nice short, I will try to update my plugin to the new style 🙂

    Is it easy to read a json file from disk when you visit a page, Lets sat that you have somthing in stuff.json and that file is updated now an then on the disk.

  • 0 Votes
    6 Posts
    2k Views

    @baris and in the version like 1.2.1 how I can do ( I can't upgrade to 1.3.0) ? Because if I use 👍

    db.getSortedSetRevRange('uid:' + uid_of_user + ':bookmarks', 0, -1, callback);

    It's not work in the 1.2.1 maybe I can use:

    db.getSortedSetRange('uid:'+uid+":favourites",callback);?
  • 0 Votes
    20 Posts
    5k Views

    Provide more details please.

  • NodeBB Android App

    NodeBB Plugins
    11 Votes
    79 Posts
    49k Views

    @Rootzilla be more precise.