Remove the JS addition from eloqua_init() and move it to an ['#attached'] array element on a form via an alter.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drupalninja99’s picture

I will add in some visibility settings like you see in other modules.

drupalninja99’s picture

Status: Active » Needs review
FileSize
6.92 KB

I have a patch that looks like it works pretty good. I stole it from Pardot who stole it from google analytics.

Albert Volkman’s picture

Wondering... since this javascript is only used in tandem with forms, would it be better to move it out of hook_init() and into a hook_form_alter()?

drupalninja99’s picture

No Eloqua is used on every page for tracking. Thats why I added the visibility stuff so admins could have more control.

Albert Volkman’s picture

FileSize
6.93 KB
892 bytes

One small fix to the comments.

drupalninja99’s picture

Status: Needs review » Fixed

Pushed to 7.x-1.x. The Drupal.org packager is having problems but I will try to put out a new release this week.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.