This module adds Marketo tracking capability to your Drupal site.
- Drupal 7.x
- An active Marketo account http://www.marketo.com/
- Copy the entire marketo_ma directory the Drupal sites/all/modules directory.
- Login as an administrator. Enable the Marketo MA module in "Administer" -> "Modules"
- (Optional) Enable the Marketo MA User module in "Administer" -> "Modules"
- (Optional) Enable the Marketo MA Webform module in "Administer" -> "Modules"
The Marketo MA configuration page can be found under Configuration > Search and metadata > Marketo MA. The direct path is admin/config/search/marketo_ma.
At a minimum, you need to provide your Marketo Account ID and Munchkin API Private Key. The Munchkin API Private key can be set/retrieved on your Marketo admin site under Admin > Integration > Munchkin > API Configuration.
Account ID: Your Marketo account ID.
Default Lead Source: If you would like all lead updates to include a default Lead Source you can set it here. If a LeadSource field is defined elsewhere in your lead data, perhaps as a webform component, it will take precedence over this setting.
Verbose Logging: If checked, additional data will be added to watchdog.
Tracking Method: Multiple options are available for how captured data is submitted to Marketo.
- SOAP API (Synchronous) - Lead data will be sent to Marketo immediately but may increase page load time.
- SOAP API (Asynchronous) - Lead updates are added to a queue when captured and data is sent to Marketo each time cron runs. Ensure you are running cron regularly.
SOAP API: Values for these fields can be set/retrieved on your Marketo admin site under Admin > Integration > SOAP API. Additional information can be found in the Marketo article Configuring Your SOAP API Settings.
- SOAP endpoint
- User ID
- Encryption Key
SOAP configuration will be validated upon save.
SOAP API - SoapClient Proxy Settings: Proxy settings can be set if your server needs to use a proxy for external requests.
The fields configured here will be available for mapping to User and Webform fields. They should match those that are defined in your Marketo admin under Admin > Field Management. Additional information regarding Marketo fields can be found in the Marketo articles Field Management and Export a List of All Marketo API Field Names.
Marketo Fields: This section should contain a pipe "|" delimited list of the fields in the format "[Field API Name]|[Friendly Label]". The default setting is:
FirstName|First Name LastName|Last Name Email|Email Address
Configure options for which pages should be tracked or excluded from tracking.
Add tracking to specific pages: This option defines the default rule for tracking pages.
- All pages except those listed below
- Only the pages listed below
Specify pages by entering their paths, one path per line, and optionally using a * as a wildcard. The default setting is:
admin admin/* batch node/add* node/*/* user/*/*
Configure options for which roles should be tracked or excluded from tracking.
Add tracking to specific roles: This option defines the default rule for tracking user roles.
- All roles except those selected below
- Only the roles selected below
Roles defined on the site will be available for selection.
The Marketo MA User module allows you to capture and update lead data as users login and change their profiles. These steps assume you have already configured additional account fields admin/config/people/accounts/fields.
Management of all integration options are handled on the main Marketo MA configuration page found at admin/config/search/marketo_ma.
- Enable the Marketo MA User module.
- Ensure that SOAP API settings are configured in the API Configuration section. User integration is dependant on the SOAP API and will leverage it regardless of which tracking method you have selected.
- In the User Integration section you will find options for activity triggers as well as field mappings. It is recommended that you select all of the options under "Trigger a lead update on the following events".
- In the User Field Mapping section you will see a table of all custom fields which have been added for accounts. Use the select boxes in the Marketo column to map each field. The options available to you are defined in the "Field Definition" section of the the Marketo MA config screen.
- Save configuration
It is not necessary to define a mapping for email address as this field is automatically mapped to the Marketo "Email" field.
Note that the module creates three rules that are disabled by default. These three rules allow you to customize the way user data is sent to Marketo beyond the vanilla defaults above. So if you wanted to send some other data that isn't available on the reg field, you can enable the "Update Marketo lead on user creation" rule, add the various fields and data you want to send upon registration into the rule (by default this rule only sends the email) and then save and activate the rule. This rule will then override the default behavior. For more info you can read instructions from @jyokum on this ticket: https://www.drupal.org/node/2507733
Marketo settings for a given webform are managed on each individual node. This section displays a table of all content on the site that may have a webform attached to it and provides an overview of each item's current state.
- Title - The title of the webform.
- Tracking Enabled - A Yes/No value indicating if tracking is currently enabled for this webform.
- Components Mapped - The number of form components that have been mapped to a Marketo field.
- Manage - A direct link to the Marketo component mapping page for this webform.
Configuring a Webform for tracking
These steps assume you already have a webform and components defined. Instructions for creating a webform can be found here http://drupal.org/documentation/modules/webform.
- Ensure the Marketo MA Webform module is enabled.
- From the Webform Integration section of the Marketo MA module configuration page, click the Edit link for the webform you would like to configure. Alternatively you can view the webform node directly and click the Marketo link found on the Webform tab. The direct path to the setup page will be node/%nodeid/webform/marketo.
- Enable or disable lead capture for this webform by toggling the "Capture Data" checkbox. When this setting is unchecked, no data will be sent to Marketo.
- Assuming you have defined components for this webform you will see a table of all components and their associated Marketo mappings. Use the select boxes in the Marketo column to map each field. The options available to you are defined in the "Field Definition" section of the the Marketo MA config screen. At a minimum must have a field mapped to the Marketo Email if you want data to be captured.
- Save the form