You are here

function hook_hotjar_snippet_alter in Hotjar 8.2

Allows the script snippet to be modified.

This hook will not be called when the Hotjar attachment mode is set to be attached as an asset.

Parameters

string $script: The Hotjar activation script.

1 invocation of hook_hotjar_snippet_alter()
SnippetBuilder::buildSnippet in src/SnippetBuilder.php
Get Hotjar snippet code.

File

./hotjar.api.php, line 69
Hooks provided by the Hotjar module.

Code

function hook_hotjar_snippet_alter(&$script) {
  $script = 'window.enableHotjar = function() { ' . $script . ' };';
}