public static function OfficialFacebookPixelInjection::injectNoScriptCode in Official Facebook Pixel 8
Same name and namespace in other branches
- 7 src/OfficialFacebookPixelInjection.php \Drupal\official_facebook_pixel\OfficialFacebookPixelInjection::injectNoScriptCode()
1 call to OfficialFacebookPixelInjection::injectNoScriptCode()
File
- src/
OfficialFacebookPixelInjection.php, line 61 - Contains \Drupal\official_facebook_pixel \OfficialFacebookPixelInjection.
Class
- OfficialFacebookPixelInjection
- Class OfficialFacebookPixelInjection.
Namespace
Drupal\official_facebook_pixelCode
public static function injectNoScriptCode(array &$page) {
// Inject inline noscript code to head
$pixel_noscript_code = PixelScriptBuilder::getPixelNoscriptCode();
$page['#attached']['html_head'][] = [
[
'#tag' => 'noscript',
'#value' => $pixel_noscript_code,
],
'facebook_pixel_noscript_code',
];
}