public function GoogleOptimizeHidePageController::snippet in Drupal 8 Google Optimize Hide Page 8
Get JS Snippet.
Return value
Response JS Snippet.
1 string reference to 'GoogleOptimizeHidePageController::snippet'
File
- src/
Controller/ GoogleOptimizeHidePageController.php, line 20
Class
- GoogleOptimizeHidePageController
- Implements Google Optimize Hide Page Controller.
Namespace
Drupal\d8_google_optimize_hide_page\ControllerCode
public function snippet() : Response {
$snippet = new SnippetGenerator();
return new Response($snippet
->getSnippet(), 200, [
'Content-type' => 'application/javascript',
]);
}