function official_facebook_pixel_page_build in Official Facebook Pixel 7
Implements hook_page_build().
File
- ./
official_facebook_pixel.module, line 59 - Contains facebook_pixel.module.
Code
function official_facebook_pixel_page_build(&$page) {
if (!should_render()) {
return;
}
$options = OfficialFacebookPixelOptions::getInstance();
// Return if pixel_id is not positive integer
if (!OfficialFacebookPixelUtils::isPositiveInteger($options
->getPixelId())) {
return;
}
OfficialFacebookPixelInjection::injectPixelCode();
}