Analytics tracking code in global footer widget
I put a couple of analytics tracking tags (for Piwik and Quantcast) in the default HTML widget in the Global footer widget area, but they do not show up when I view the source of any of the site's page. But because I'm using Lavender, I had to add the tags to the footer.tpl file of Vanilla. But even at, visitor traffic is barely registering.
Is there something special that needs to be done before analytics tracking codes can work as expected with NodeBB?
This is related to an earlier post. See Unique visitor stats
Actually, widgets are dynamically inserted after loading, so you wouldn't see it via view-source. We did that to speed up the actual page loading time, although we later realized that this doesn't play nice with browsers that have noscript enabled. In short, yeah we'll be rendering widgets on cold load in the near future
I don't think it specifically has anything to do with your problem though, ie. it should work regardless. Any errors? Maybe its something similar to the
document.writeproblem you had with AdSense
I think the issue of tracking and how NodeBB works is something that has to be given a new look, especially for those who might want to monetize their traffic. AJAX is great, but commercial publishers hate it. I guess that's why it's not very popular with the likes of Facebook and other social networks.
Since commercial publishers have to monetize their traffic (user activity), every one of those activities has to count (and be reflected in their analytics app), especially those that present a different page to a user.
@julian's done something like this for his Google AdSense plugin, he might be able to shed some light. But I would imagine that at that point one may as well write an actual plugin for it rather than code it as a widget
Considering that, as far as commercial publishers are concerned, that this is something that could negatively impact the adoption of NodeBB, don't you think this is something that shold be taken up by the Core devs.
No, I'm not trying to put pressure on anybody, but as a core-bundled plugin, this would be great to have with every installation of NodeBB.
don't you think this is something that shold be taken up by the Core devs.
@julian is a core dev, well, unless you've recently fired him.
for his Google AdSense plugin
Ah, woops. I meant Google Analytics, by @julian, ie. would probably be about the same code to accomplish the above.
@bentael suggested a solution here
It was @julian I guess monday is identity crisis day
This is all the code I need to push new page events to GA. Piwik or Quantcast ought to have something similar.