You are here

function facebook_pixel_ctools_render_alter in Facebook Pixel 7

Implements hook_ctools_render_alter().

Tracks key page views (ex: product page, landing page, article), when configured to display from within Panels.

File

./facebook_pixel.module, line 63
Drupal Module: Facebook Pixel.

Code

function facebook_pixel_ctools_render_alter(&$info, &$page, &$context) {
  if ($page && !empty($context['handler']->task) && $context['handler']->task == 'node_view') {
    $nid = reset($context['args']);
    facebook_pixel_add_event('ViewContent:' . $nid);
  }
}