public static function OfficialFacebookPixelInjection::injectPixelCode in Official Facebook Pixel 8
Same name and namespace in other branches
- 7 src/OfficialFacebookPixelInjection.php \Drupal\official_facebook_pixel\OfficialFacebookPixelInjection::injectPixelCode()
1 call to OfficialFacebookPixelInjection::injectPixelCode()
File
- src/
OfficialFacebookPixelInjection.php, line 32 - Contains \Drupal\official_facebook_pixel \OfficialFacebookPixelInjection.
Class
- OfficialFacebookPixelInjection
- Class OfficialFacebookPixelInjection.
Namespace
Drupal\official_facebook_pixelCode
public static function injectPixelCode(array &$page) {
$options = OfficialFacebookPixelOptions::getInstance();
PixelScriptBuilder::initialize($options
->getPixelId());
self::injectScriptCode($page, $options);
self::injectNoScriptCode($page);
foreach (OfficialFacebookPixelConfig::integrationConfigFor8() as $key => $value) {
$class_name = 'Drupal\\official_facebook_pixel\\integration\\' . $value;
$class_name::injectPixelCode($page);
}
}