module - Drupal statistics does not count visits when I see the node from a custom panel -
module - Drupal statistics does not count visits when I see the node from a custom panel -
i have web site each node has 3 diferents designs (i through panels , arguments) , utilize statistics module, way can see how many visits has node.
but statistics module jus count visits when visit main design. can explain example:
website .com/node/01 <---when user visit url, visit counted website .com/node/01/mobile <----- here not counted visit website .com/node/01/lightbox <----here not counted visitthis built panels , arguments... so, there anyway set php code in 2 panels visitors don't have start count?
best,
it's because panels doesn't invoke node_view(). please seek next code:
function module_ctools_render_alter(&$info, &$page, &$context) { if ($context['handler']->task == 'node_view') { $key = $context['handler']->conf['context']; $node = $context['contexts'][$key]->data; statistics_node_view($node, 'full') } }
drupal module drupal-7 statistics panels
Comments
Post a Comment