You are here

function pardot_init in Pardot Integration 7

Implements hook_init().

Add site tracking javascript. This is split into to calls to be consistent with the reference javascript and still provide a reasonable way to futz with the implementation though the theming layer.

File

./pardot.module, line 19
Pardot integration module.

Code

function pardot_init() {
  global $user;
  if (_pardot_visibility_pages() == 1) {
    if (_pardot_visibility_roles($user)) {

      // Add Pardot JavaScript.
      pardot_js();
      drupal_add_js(drupal_get_path('module', 'pardot') . '/pardot.js', array(
        'scope' => 'footer',
      ));
    }
  }
}