function hubspot_page_attachments in HubSpot 3.x
Same name and namespace in other branches
- 8 hubspot.module \hubspot_page_attachments()
Implements hook_page_attachments().
File
- ./
hubspot.module, line 106 - Sends Webform results to HubSpot's Forms API.
Code
function hubspot_page_attachments(&$page) {
// If tracking code is enabled then Attach the library.
if (\Drupal::config('hubspot.settings')
->get('tracking_code_on')) {
$page['#attached']['library'][] = 'hubspot/hubspot.code_tracking';
}
}