Drupal statistics does not count visits when I see the node from a custom panel I have a web site where each node has three diferents designs (i do it through panels and arguments) and i use the statistics module, that way i can see how many visits has the node.

But the statistics module jus count the visits when they visit the main design. I can explain with a example:


website .com/node/01 &lt;---when a user visit this url, a visit is counted
website .com/node/01/mobile &lt;----- here is not counted the visit
website .com/node/01/lightbox &lt;----here is not counted the visit


This was built for panels and arguments... so, is there anyway to put a php code in two panels that visitors don't have to start to count?

Best,
It's because panels doesn't invoke node_view(). Please try following code:

function MODULE_ctools_render_alter(&amp;$info, &amp;$page, &amp;$context) {
  if ($context['handler']-&gt;task == 'node_view') {
    $key = $context['handler']-&gt;conf['context'];
    $node = $context['contexts'][$key]-&gt;data;
    statistics_node_view($node, 'full')
  }
}