Web Personalization

The Web Personalization JavaScript API extends the platform’s automated personalization capability. It allows for event tracking and dynamic customization of a webpage. Additional capabilities: Custom Data Events, Dynamic Content, Get Visitor Data, Exclude Tag for Specific Bots.

  • You must become a Web Personalization customer and have the RTP tag deployed on your site prior to using the User Context API.
  • RTP does not support Account Based Marketing named account lists. ABM lists and code only pertain to the uploaded account lists (CSV files) managed within RTP.

Tag Setup

The RTP tag should be inserted at the header of the personalized page.

Account Setup

This method is called automatically on the tag level to set the relevant account id. You can set the account id when you wish to split between different domains.

Parameter Optional/Required Type Description
‘setAccount’ Required String Method name.
accountId Required String Account Id.

Event Sending Functions

This method sends a view event, which is used for page tracking. In the example below, the current page url will be tracked as a visitor page view.

By passing the optional “page” parameter in this method, the current page can be overridden.

Parameter Optional/Required Type Description
‘send’ Required String Method action.
‘view’ Required String Method name.
page Optional String Relative  path or full page URL.

Exclude Tag for Specific Bots (User Agents)

To exclude specific browsers from sending data to the Web Personalization platform (in the case of identified bots), add the following IF statement to the tag script.

In the code example below, “Googlebot|msnbot” are used as bot examples to exclude from Web Personalization activities.

JavaScript Calls Explained

Description of JavaScript that is added to a website when using Web Personalization and Predictive Content.

Core/Dependent JavaScript

Name Description Control
rtp.js Controlled by Marketo
jquery.min.js v1.8.3 Can be disabled
jquery-custom-ui-min.js v1.9.2 Can be disabled
query-ui-1.8.17-dialog.js v1.9.2* Can be disabled

* Used only if jQuery UI is missing dialog

On Demand JavaScript

Name Description Control
ga-integration-2.0.1.js Used if Google Analytics/Facebook/SiteCatalyst integration is enabled Controlled by Marketo
insightera-bar-2.1.js Used if predictive content recommendation bar is enabled Controlled by Marketo
froogaloop2.min.js Used if content tracking is enabled and Vimeo player exists on page
iframe-api-v1.js Used if content tracking is enabled and YouTube player exists on page