Custom variables - Intranet subnets

Before this release I had asked the question about to display a report by subnet, this is of interest to us as we are tracking an Intranet rather than Internet.

I was told that this would be available with custom variables. However, I can’t seem to see how to set this up.

The documentation for custom variables (Custom Variables Analytics - Analytics Platform - Matomo) is both verbose and vagues, and seems to point to javascript API. This is suggesting we have to change the tarcking code for custom varibaes to work? If this is the case - WHY?. Piwik already has the IP, I just want to translate that into a building / department using the associated subnets

Even when I look through javascript tracking documentation (http://piwik.org/docs/javascript-tracking/#toc-custom-variables) I don’t see how to set this up for subnets.

And this ceratinly does not get us closer to building a custom atlas.

So I still woudl like to know how I can monitor usage by subnet.

Michael

Hi,

I am no expert (at all), but my instinct would be to grab the ip address in the javascript, parse it, map the subnet to the building (in the javascript), and then pass the building as the value of a custom variable at the visit level to piwik.

Hopefully people more knowledgeable than I will also reply.

Best,
David

i too have great need for something like this

im new to Piwik btw, but from my limited knowledge of Custom Variables, wont they only apply to data from that moment on? i have quite a bit of previous data i need segmented as well. im thinking more that a widget is what is necessary. but i havent had much luck with this plugin either.

Hi krems04,

Once again, I’m very much a newbie, but that said, I suspect you could take your historical data, parse it manually, and then upload it into the sql database that you create for Piwik.

Best,
David