Since Adobe's acquisition of Marketo last year, more and more Adobe Experience Manager (AEM) customers, especially those in the B2B space, are looking to leverage Marketo for their marketing automation needs. Marketo enables marketers to orchestrate powerful and complex marketing campaigns that span multiple channels. However, AEM customers are also wondering how they can fully leverage Marketo when those visitors land on their AEM-created websites. In particular, having real-time access to information about the visitor when they are on your site can significantly improve form conversions, enable personalized experiences, and enhance reporting and analytics. This article will take an in-depth look at how to maximize your Marketo and AEM integration for success.
Marketo Munchkin Tracking
The first step in integrating Marketo and your AEM site is to configure Marketo Munchkin tracking. Munchkin tracking enables visitor activities performed on your site to be sent to Marketo. To deploy the Marketo Munchkin tracking code, you would ideally inject the script onto your website using your tag management system (i.e. Adobe Launch). When the Munchkin tracking script executes, page views and link clicks are tracked, and a cookie is created with a unique Marketo visitor ID. In addition, you can modify the default Munchkin “visitWebPage” call to capture additional details about the page, such as the site section, current product, and type of content being viewed. The more information you can collect about the visitor’s interactions on the site, the more accurately you can determine their interests and level of engagement.
Accessing Marketo Lead Information using REST APIs
WIth Marketo collecting visitor information, the next step is to retrieve information about the visitor from Marketo when the visitor is on your AEM site. Marketo provides several methods to access data that has been collected about the visitor, including a REST API secured by OAuth. To retrieve details about your visitor, call the “Get Lead by Filter Type” REST API method, setting a Filter Type of “cookie”, passing the value of the visitor’s Munchkin ID as the Filter Value, and including the lead fields you want to be returned in the Fields parameter. However, since OAuth is used which requires a customer-specific client id and key to be sent with the request, you’ll want to execute the OAuth request server-side in order to not expose those secure values to visitors. Ideally, leverage a service such as Adobe I/O Runtime to encapsulate and host the REST API call, which also makes it easier for AEM to consume the service via an externalized service endpoint.
Leveraging AEM’s ContextHub
When using forms to collect visitor information on your AEM site and then sending the collected information to Marketo, you have two options. The first option is to define the form in Marketo and then embed the form on your AEM site. This method allows the management of the form to be handled by Marketo with the form's HTML embed code added to the AEM site in order to render the page. The other option is to define your form in AEM, ideally using the Form Core Components provided by AEM as a starting point. This option allows for forms to be managed directly in AEM rather than Marketo but does require additional coding to fully integrate.
If choosing to use an AEM form, I would recommend you leverage the Marketo Forms 2.0 API to have your AEM form interact with Marketo. From the AEM side, the key to making this integration work is to correlate your AEM form field names with the Marketo form field names, as well as mapping the AEM form to a Marketo form. These mappings will be needed to ensure that the data captured is sent properly to Marketo. A simplified approach is to create a singular form in Marketo that can be used by all AEM form submissions and to let Marketo dynamically handle the processing based on the type of data that is sent from AEM. For this singular Marketo form, do not include fields and set the form’s style tag to “display:none” so that the form doesn’t visibly render on the AEM site when requested. With this hidden Marketo form included on your AEM page, you can then use the Forms 2.0 API to submit your custom AEM form to Marketo for processing. Also, if you want to control the post-submission experience, intercept the Forms 2.0 OnSuccess callback so that you can redirect to a page or asset as desired.
AEM Personalization based on Marketo Segments
Another advantage of having the Marketo lead data stored in AEM’s ContextHub is that you can create personalized content in AEM. The first step is to determine which Marketo attributes you want to create unique content for, such as the visitor's industry, company, or geography. Then define Audiences in AEM based on those respective ContextHub store attributes. With the audiences defined, you can then create specific AEM campaigns for each audience value that you want to target, such as an “Industry – Retail” campaign or a “Country – United State” campaign. With those campaigns in place, when editing an AEM page, you can then select Targeting Mode for the page, add/select the desired campaign, and start creating targeted content for that desired audience segment. At runtime, when a visitor arrives on the page, AEM will check to see if the visitor is a member of those audiences, and if so, they will see the unique targeted content rather than the default content.
Marketo Integration with Adobe Analytics, Audience Manager, and Target
Another powerful integration benefit can be achieved by feeding your Marketo attributes to Adobe Analytics so that you can include them in your analytic reports. To accomplish this, include any Marketo attribute that you would find helpful from a reporting standpoint in your site’s Data Layer. For example, if you include your visitor’s Industry in your data layer, you can then capture and create reporting segments based on industry. Other attributes to consider would be geography, lead score, account, or active campaign. Of course, you would not want to include Marketo attributes that would be considered personally identifiable information (PII) since PII data should not be stored in Adobe Analytics.
In addition to personalizing content directly in AEM as noted before, you can also personalize content using Adobe Target. As Adobe Analytics receives data from your site, it can be forwarded to Audience Manager via server-side forwarding. With the data in Audience Manager, Target can then pull that data and create audiences based on those attributes. Target users can then use Visual Experience Composer to create personalized content for those audiences. As an alternative, you can push those target audiences to AEM so that AEM authors can manage the personalized content instead. When taking this approach, select the “Adobe Target” rather than "AEM" as the targeting engine. The Adobe Target engine has the added advantage of sending metrics to Target so that you can accurately measure the impact of your personalization efforts.
Hopefully, this article has provided insights into the types of integrations that are available between Marketo and AEM. As Adobe looks to further integrate Marketo into the Adobe Experience Cloud platform, I expect we’ll see even tighter integrations that make it easier for marketers to leverage these powerful features. If you have Marketo and AEM and need assistance in achieving these integrations, B2evolve would love to be your trusted partner. Feel free to connect with me on LinkedIn, and for those in the Dallas/Ft. Worth area, we would love to have you join our Dallas AEM User Group on Meetup.