diff --git a/adobeanalytics.module b/adobeanalytics.module index d24b74a..8dac92a 100644 --- a/adobeanalytics.module +++ b/adobeanalytics.module @@ -5,13 +5,6 @@ * Adds the Javascript to the bottom of Drupal page. */ -/** - * To allow tracking by the AdobeAnalytics package. - */ - -define('ADOBEANALYTICS_TOKEN_CACHE', 'adobeanalytics:tag_token_results'); - -use \Drupal\Core\Render\Markup; use \Drupal\Core\Routing\RouteMatchInterface; /** @@ -21,14 +14,14 @@ function adobeanalytics_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.adobeanalytics': - return t("Settings for AdobeAnalytics."); + return ['#markup' => "

" . t("Settings for AdobeAnalytics.") . "

"]; } } /** * Implements template_preprocess_html(). */ -function adobeanalytics_preprocess_html(&$variables) { +function adobeanalytics_page_bottom(&$variables) { $user = \Drupal::currentUser(); $config = \Drupal::config('adobeanalytics.settings'); @@ -73,7 +66,7 @@ function adobeanalytics_preprocess_html(&$variables) { $adobeanalytics_js_file_location = $config->get( "adobeanalytics_js_file_location" ); - $js_file_location = ['#plain_text' => $adobeanalytics_js_file_location]; + $js_file_location = $adobeanalytics_js_file_location; // Add any custom code snippets if specified and replace any tokens. $context = $adobeanalytics_helper->adobeAnalyticsGetTokenContext(); @@ -94,7 +87,7 @@ function adobeanalytics_preprocess_html(&$variables) { $header .= $adobeanalytics_version; $header .= "\nCopyright 1996-" . date('Y') . " Adobe, Inc. -->\n"; $header .= "\n"; $header .= "