Personalization Site Impact Approach
The Personalization module of the Salesforce Interactions SDK runs on web pages to gather relevant information, and modify content to provide a personalized experience to the web page’s visitors. This document covers details on the expected behavior of the SDK regarding page load performance.
It is important to note that the client-side JavaScript served by Marketing Cloud Personalization is categorized into three main sections within the same file, in the following order:
- The Personalization module of the Salesforce Interactions SDK
- Beacon Extensions
- Sitemap
While the SDK portion alone remains the same for every integration, Beacon Extensions and Sitemap can be different and could have special considerations regarding site impact.
Downloading and executing Interaction Studio’s JavaScript inherently impacts a site’s performance just by being a new piece of content to load.
Personalization minimizes the impact by doing the following.
- Serving via a global Content Delivery Network (CDN) with over 40 points of presence around the globe.
- Utilizing our CDN option to serve stale; even if the SDKs origin server is unavailable or slow, we continue to serve a cached version of the SDK.
- Client-side caching, to ensure only the first page load requires downloading of the file.
- Keeping the Web SDK small, under 50 KBs compressed with gzip, before optional Beacon Extensions and the Sitemap.
While the preceding points apply to all Web SDK integrations, there are two methods for integrating Personalization into a website - Synchronous and Asynchronous. Each method has different levels of impact on the site.
With a synchronous integration, the Interaction Studio’s JavaScript downloads when it is present on the page before the browser executes the rest of the page. In doing so, the Flicker Defender Beacon Extension prevents content that could be personalized from appearing before it can be personalized, and tracking can take place as soon as possible.
With an asynchronous integration, Interaction Studio’s JavaScript downloads alongside the rest of the page’s content loading. Flicker Defender does not function in asynchronous integrations.
Personalization uses multiple industry-standard CDN providers. In the unlikely scenario that one of them has an outage, we can quickly reconfigure Personalization to use another provider.
You can view Personalization CDN statuses by visiting Salesforce Trust.
If Interaction Studio’s CDN is unavailable, the request to load the SDK would fail, or timeout, therefore resulting in no personalization occurring. For synchronous integrations, the page's loading is delayed until failure.
After the JavaScript is downloaded, it executes in the order of content (Web SDK, Beacon Extensions, Sitemap). The targeted time for executing the Web SDK’s JavaScript and calls to initialize the Web SDK via the Sitemap is in under 30 milliseconds.
Script failures inside the Web SDK, Beacon Extensions, and Sitemap are caught and logged to prevent the scripts from negatively impacting the site’s core functionality. You can track errors within Interaction Studio’s event stream to help identify resolutions in cases where the Sitemap errors prevent personalization.
After execution, the JavaScript beacon sends an event to Interaction Studio’s Event API, and its response will contain any personalization campaigns for which the user has qualified. Personalization targets 20 ms for all server-side execution. End-user response time is subject to the performance of the internet connection.
These requests have no impact on the page loading and do not cause failures for your end user. If Flicker Defender is active, hidden content will redisplay after the configured timeout, with a default of 2.5 seconds from the time the beacon extension first ran.