Skip to main content

Install the LoudCrowd Storefront page in your Salesforce Website

J
Written by Josh Garrisi
Updated over 9 months ago

LoudCrowd storefronts run on the concept of web-components, whereas your site can load and use functional components of LoudCrowd programs right in your own eCommerce platform.

Create a page within your Salesforce site and open it for html editing.

Note: LoudCrowd’s web components render based off of URL parameters, and therefore all the storefronts for your ambassadors only require one page within your system.

Install LoudCrowd JS SDK

Important Note about Tag Managers:

It is common for many e-commerce teams to want to add our javascript to the page using a tag manager like Google Tag Manager (GTM) or Adobe Launch (formerly DTM). However, due to the latest privacy and security settings in iOS 17+, most of those tag managers are being blocked by default, thus rendering the storefronts unusable for a significant percentage of buyers. Loudcrowd's javascript is used to load dynamic content in to the components, not perform user tracking or profiling. Therefore, our recommendation is to not use tag managers to load Loudcrowd javascript.

Install

In the <head> of that page, load and initialize the main LoudCrowd Base code snippet:

<script type="module" src="https://pub.loudcrowd.com/embed.js"></script> <script>
function initLoudCrowd() {
window.loudcrowd.init("SHOP_ID");
};
if (window.loudcrowd) {
initLoudCrowd();
} else {
document.addEventListener("loudcrowd-global-loaded", initLoudCrowd);
}
</script>

Where SHOP_ID is a LoudCrowd Identifier for the your site. Ask your LoudCrowd representative for your SHOP_ID.

The page's Content Security Policy will need to be updated to allow our ui to load.

NOTE: for each rule, only add LoudCrowd if you already have a policy for that rule.

script-src *.loudcrowd.com
style-src *.loudcrowd.com
media-src *.loudcrowd.com lookaside.fbsbx.com
img-src *.loudcrowd.com lookaside.fbsbx.com
connect-src *.loudcrowd.com

Add LoudCrowd Web Components

Next, in the body tag, you will need to place each of the web-components you desire to be displayed. For example:

<ambassador-featured-product-block></ambassador-featured-product-block>
<ambassador-hero-block></ambassador-hero-block>
<ambassador-feed-block></ambassador-feed-block>

Note: LoudCrowd currently supports three web components for Storefonts.

  • ambassador-hero-block: renders the header banner, including the social user’s profile picture, biography, follower count, etc.

  • ambassador-feed-block: renders the main content feed including products and UGC posts

  • ambassador-featured-product-block: when a product share-link is loaded, this block renders the section highlighting that product above the rest of the page

Note*:* You'll need to work with dedicated client strategist on setting up your program.

To test the blocks load correctly, load the page with a url parameter ?lc_ambassador_id=demo_ambassador. this will load mock data into the blocks for testing.

Small UI Customizations

The LoudCrowd app can control many of the standard customizations of these components like copy, number of fields, what data is displayed, etc. However, there will be some CSS customizations that need to be deployed on the actual page to ensure that it looks consistent with the rest of the site.

Elements like margins, padding, spacing, etc. all need to be manipulated from that page's CSS. For more information, please refer to this documentation: https://intercom.help/loudcrowd-developer-docs/en/articles/8348912-styling-storefront-blocks

Did this answer your question?