To show the live events on your website you will have to add a customizable code on the page where you want to see the events. Then link the add to cart button to your website.
Set up the tag to display your live events
Let's start with the tag. You can select the attributes in the Customizable Properties listed below to activate different features. You need to replace the store-id's value with the one given to you during the onboarding.
In some cases, you won't be able to integrate the tag above in a Tag Manager. It will raise an error. As a workaround, use this tag:
<!-- Create a container for your widget --><divid="container"></div><!-- Load the script --><scriptasynctype="module"src="https://landing.ls.skeepers.io/live-shopping-landing.es.js"></script><!-- Create the widget programatically --><scripttype="text/javascript">// Create the widgetconstwidget=document.createElement('skp-landing');// Add the attributeswidget.setAttribute('store-id','XXXXX');widget.setAttribute('display-type',"all");widget.setAttribute('transaction-type',"addToCart");widget.setAttribute('staging',false);widget.setAttribute('refresh-on-close',false);widget.setAttribute('should-display-preview',true);// Append it to the container created abovedocument.querySelector('#container').appendChild(widget);</script><scripttype="text/javascript">conststyles=document.createElement('style');styles.type ="text/css";styles.innerHTML =` :root { --skp-primary-color: #000000; } `;document.head.appendChild(styles);</script>
Here is an example once the tag is integrated
Your live events have 4 different states:
Upcoming → The live is planned for an upcoming date. The days remaining will be displayed until 24 hours before the live, then a countdown will appear. Users can also add this event to their calendar or register to be notified by SMS (Option). When the countdown reaches 00:00:00 it will be replaced with the button “Watch the live”.
Live → Users can now click “Watch the live” to open the player then browse the products, use the chat, make purchases… The splash screen video will be displayed until your broadcast starts.
In review → Your live is over, you submitted it to review. You can now review your video and publish it from the web back office
Replay → Your live has been reviewed, it is now available for everyone to watch. The chat is disabled but users can still read the comments made during the live.
Customizable properties
Property
Description
Type
store-id
Use your store id provided by Skeepers
String
display-type
"all": Display all your live shopping event
"upcoming": Display upcoming and live events
"archived": Display events in replay
"one": Display a specific event by adding broadcast-id : [id] under the displayType
"pdp": Use it with the product attribute. See our PDP integration
"none": Use it with our API integration
String
staging
true: Use it for your testing environment. Display the broadcasts set with staging: true and staging: falsefalse: Use it for your production environment. Display the broadcasts set with staging: false
Boolean
transaction-type
"addToCart": Displays an "Add to cart" button in the player. You will have to set up the add to cart
"linkToProductPage": Displays an "Open product page" button. Open the product's page in the same page if you are in the same domain. Open in a new tab if in another domain.
"customLinkToProductPage": Listen to our event to custom how you open the link to the product page. See more details
String
keywords
Filter your events by keywords. Add the keywords set during the broadcast's creation / edition on the backoffice. Case sensitive.
Ex: keywords="["Beauty","Makeup"]"
[String]
refresh-on-close
true: Refresh the page when closing the player
false: Doesn't refresh the page when closing the player
Boolean
product
abcd_123: A Product Id used for your live event. Use it with the display-type: "pdp" attribute. See our PDP integration.
String
should-display-preview
true: Display the preview of your live event directly in your landing page.
false: Doesn't display the preview of your live event. Keeps your live shopping image instead.
Boolean
picture-in-picture-mode
"default": Picture In Picture is activated and we can navigate across the whole website with the video.
"partial": Picture In Picture is activated on the landing page. The viewer can't navigate elsewhere.
"disabled": Picture In Picture is deactivated.
String
close-iframe-on-close-sp
true: Close the iframe when closing the player. Works with picture-in-picture-mode: "default" or picture-in-picture-mode: "partial".
false: Stay in the page when closing the player.
Boolean
Add to cart
To enable viewers to do an add-to-cart from a live, you need to set up a small code snippet with your software developer(s).
When using the transaction-type: "addToCart", the player displays an add-to-cart button. You will have to set up your add-to-cart system by listening to the skp:addToCart event emitted by the button once it's clicked.
You can use this event to add your own tracking on each add-to-cart coming from the player. This way you can track add to cart done during a live or a replay all the way to your checkout.
window.addEventListener('skp:addToCart', (event) => {const { origin,product } =event.detailconsole.log('origin', origin);console.log('product', product);addProductToCustomerCart(product); // Replace it with your own add to cart implementationsendTrackingToYourPlatform(origin, product); // Replace it with your own tracking solution})
Product information comes from your product feed. Check the product ID in the product feed, it must be the same one used by your ecommerce platform.
Shopify
constaddToCartHandler= (event) => {const { product } =event.detail;constform=newFormData();form.append('quantity',1);form.append('form_type','product');form.append('id',product.id);fetch(window.Shopify.routes.root +'cart/add', { method:'POST', body: form, headers: { accept:'application/javascript' }, }).then(response => {returnresponse.json(); }).then(response => {// You could integrate your tracking for example }).catch((error) => { console.error('Error:', error); });}window.addEventListener('skp:addToCart', addToCartHandler);
If you are using Shopify you can also install our Shopify App to easily integrate Live Shopping. More information here
In the style part of the script, you can add elements to customize how your live are displayed.
<!-- Add your custom fonts --><linkrel="preconnect"href="https://fonts.googleapis.com"><linkrel="preconnect"href="https://fonts.gstatic.com"crossorigin><linkhref="https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600&display=swap"rel="stylesheet"><scriptasynctype="module"src="https://landing.ls.skeepers.io/live-shopping-landing.es.js"></script><skp-landingstore-id="XXXXX"display-type="all"transaction-type="addToCart"...></skp-landing><style> :root { --skp-radius:5px; --skp-font-family:'Nunito'; /* With your custom font */ --skp-primary-color:#121212; --skp-text-color:#2f2e2e; --skp-wrapper-color:#ffffff; }</style>
Property
Description
Type
--skp-radius
The border radius of the events cards
in px
--skp-font-family
Change the font for the title, description and CTA
String
--skp-primary-color
Color of the main button, on the landing page and the video player
#000000
--skp-text-color
Color of the title and description texts
#000000
--skp-wrapper-color
Event cards background color
#000000
Link to the product page
The transaction-type: "linkToProductPage" or transaction-type: "customLinkToProductPage" will display an action button to redirect the client to the product's page instead of the add to cart.
linkToProductPage
It will open a new tab to the product's page. It can open a link on another domain.
If the Picture in Picture mode is activated, the player will be instead reduced so that viewers can still browse your website while watching the live. More info on Picture in Picture
customLinkToProductPage
If you need to implement your own redirection system, you will need to listen to the skp:ls:openProductLink emitted by the tag.
window.addEventListener('skp:ls:openProductLink', (event) => {const { product,broadcast } =event.detail// Insert your add to card, tracking code here or any actions you want to happen})
Product information comes from your product feed. Check the product ID in the product feed, it must be the same one used by your ecommerce platform.
Autoplay
Instead of the customer manually starting the show, the player can be configured to automatically start when they land on your page.
Add the query parameter ?autoplay=liveId to the URL where you have your list of live events displayed. You can share that URL with your customers, if that live is ongoing or in replay, the player will automatically be opened when opening the page.
You can find the ID of a live in the back office or the app on the edition screen of the corresponding event
Keywords
Add keywords to your live events during creation or edition and add them in the widget to display the list of corresponding events. You can put as many keywords as you want.
Add the parameter keywords= "['A','B','...']", in the tag. Check the example below:
The player can be reduced to let your viewers browse your website while watching the live with no interruption. Viewers can click on maximize to reopen the main player at any time.
PiP mode might not work on every website. If you want to change the way it behaves, change the value of "picture-in-picture-mode" in the tag.
If you want to fully control how to display and open your live you can use our API.
Change the tag value to display-type= "none" will load our SDK on the current page without interfering with your code. You can now, with the code below, launch the video player with any of your custom designs.
<buttonid="cta-broadcast">Click To open Broadcast</button><script>window.addEventListener('skp:ls:loaded', (event) => {constdetail=event.detailconsole.log("@debug:skp:ls:loaded", detail);const {displayType,broadcasts } = detail;const$buttonBroadcast=document.getElementById('cta-broadcast');// Open a Shopping Party (You can call this method with every Mode)$buttonBroadcast.addEventListener('click', (e) => {e.preventDefault();e.stopPropagation();constopenSPEvent=newCustomEvent('spockeeOpenShoppingParty', { detail: { id:${BROADCAST_ID}, time:${YOUR_TIME}, } });window.dispatchEvent(openSPEvent); }) })</script>
The parameter of the openShoppingParty method is an object with the following attributes:
id: ID of your live event
time: Enter a time in seconds to open a replay to a specific moment
Specify the brodcastId you received with our API
To display the list of live events, use the endpoint: /v3/public/broadcasts
Open a live from a product detail page (PDP)
You can set our tag on a product page that can display a replay only if the specified product was highlighted during a live
This action will open the most recent live at the time the product was highlighted
This integration doesn't have any graphic interface, you need to create your own components to open the replay.
How to install
Add the tag on your product page (no DOM modification will be made, it will only load the Live Shopping widget