Skip to content

Commit

Permalink
Adding Pendo integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Nov 10, 2019
1 parent 4a83d46 commit e2fb343
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/df/df_tools/acquia_pendo/acquia_pendo.info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: 'Acquia Pendo'
type: module
description: 'Pendo integration for Acquia products.'
core: 8.x
package: 'Web Services'
27 changes: 27 additions & 0 deletions modules/df/df_tools/acquia_pendo/acquia_pendo.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/**
* @file
* Contains acquia_pendo.module.
*/

/**
* Implements hook_preprocess_HOOK().
*/
function acquia_pendo_preprocess_html(&$variables) {
// TEST: putenv('AH_SITE_GROUP=eemgrasmick');.
$acquia_env_vars = [
'AH_CURRENT_REGION',
'AH_SITE_NAME',
'AH_APPLICATION_UUID',
'AH_REALM',
'AH_NON_PRODUCTION',
'AH_SITE_ENVIRONMENT',
'AH_SITE_GROUP',
];
foreach ($acquia_env_vars as $value) {
if (getenv($value) !== FALSE) {
$variables['#attached']['drupalSettings']['pendo']['data']['account'][$value] = getenv($value);
}
}
}
1 change: 1 addition & 0 deletions modules/df/df_tools/pendo
Submodule pendo added at 08e356

0 comments on commit e2fb343

Please sign in to comment.