karolsojko / marketo_rest

Integrate with Marketo via REST API

Home Page:https://www.drupal.org/project/marketo_rest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Development version of the new marketo_rest module

  • Most of the functionality has now been ported, please see the issue queue. Help is welcomed; to test and report any issues in the issue queue, and also submit PRs :)

Marketo REST

This module adds Marketo tracking capability to your Drupal site. It is a fork of the Marketo MA module. Big thanks to jyokum for that.

Requirements

Installation

  1. Copy the entire marketo_rest directory the Drupal sites/all/modules directory.

  2. Login as an administrator. Enable the Marketo REST module in "Administer" -> "Modules"

  3. (Optional) Enable the Marketo REST User module in "Administer" -> "Modules"

  4. (Optional) Enable the Marketo REST Webform module in "Administer" -> "Modules"

Module Configuration

The Marketo REST configuration page can be found under Configuration > Search and metadata > Marketo REST. The direct path is admin/config/search/marketo_rest.

Basic Settings and API Configuration

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

Munchkin Javascript Library Path to munchkin.js. Defaults to //munchkin.marketo.net/munchkin.js and highly likely that you want to leave it set to the default.

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.

  • Munchkin Javascript API Lead updates will be sent to Marketo as pages are viewed using the client-side Munchkin API.

  • REST API Lead data will be sent to Marketo immediately but may increase page load time.

Munchkin Javascript API - API Private Key Your Munchkin API Private key. This can be set/retrieved on your Marketo admin site under Admin > Integration > Munchkin > API Configuration. Additional information can be found in the Marketo article Enable Munchkin API Use.

Munchkin Javascript API - Partition This currently does nothing and is ignored.

REST API Values for these fields can be set/retrieved on your Marketo admin site under Admin > Integration > REST API. Additional information can be found in the Marketo article Configuring Your REST API Settings.

  • REST endpoint
  • REST identity
  • Client ID
  • Client Secret

REST configuration will be validated upon save.

REST API - Proxy Settings Proxy settings can be set if your server needs to use a proxy for external requests.

Field Definition

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]". Example:

firstName|First Name
lastName|Last Name
email|Email Address

Page Visibility

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/*/*

Role Visibility

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.

User Integration (Requires Marketo REST User)

The Marketo REST 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 REST configuration page found at admin/config/search/marketo_rest.

  1. Enable the Marketo REST User module.

  2. Ensure that REST API settings are configured in the API Configuration section. User integration is dependant on the REST API and will leverage it regardless of which tracking method you have selected.

  3. 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".

  4. 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 REST config screen.

  5. Save configuration

It is not necessary to define a mapping for email address as this field is automatically mapped to the Marketo "Email" field.

Webform Integration (Requires Marketo REST Webform)

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.

  1. Ensure the Marketo REST Webform module is enabled.

  2. From the Webform Integration section of the Marketo REST 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.

  3. 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.

  4. 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 REST config screen. At a minimum must have a field mapped to the Marketo Email if you want data to be captured.

  5. Save the form

About

Integrate with Marketo via REST API

https://www.drupal.org/project/marketo_rest


Languages

Language:PHP 82.8%Language:Gherkin 16.3%Language:JavaScript 0.9%