Skip to main content
Embedding TWICE on Your Website

Learn How To Embed Your TWICE Store on Your Website by Editing Its HTML Code

Updated over a week ago

Embedding your TWICE store on your website can enhance your online presence and provide your visitors with a seamless shopping experience directly on your site. By inserting a few lines of code into your HTML, you can display your TWICE store efficiently. This guide will walk you through the process, step by step.

Open the TWICE Embed Builder

Access the TWICE Embed Builder available at embed.rentle.shop to obtain the necessary code snippets. This tool simplifies the embedding process by generating the correct code that you can directly copy and paste into your website's HTML:

  1. Navigate to the TWICE Embed Builder: Visit embed.rentle.shop.

  2. Generate Code: Follow the instructions on the site or read here how to generate the embedding codes for your store.

Add the Script Tag

Incorporate the TWICE script into your website to connect it to your TWICE store. Here’s how to insert the script:

  1. Copy the Script Tag: Get the script tag from the TWICE Embed Builder.

  2. Edit Your Website’s HTML: Open the HTML file of your website and find the <head></head> section.

  3. Paste the Script Tag: Insert the copied script tag into the <head> section. Here is an example of what it might look like:

<!DOCTYPE html>
<html lang="en">
<head>
<!-- Add the TWICE script here -->
<script type="text/javascript" src="https://cdn.rentle.io/embed/bundle.js" defer></script>
</head>
<body>
<h1>Welcome to my website!</h1>
</body>
</html>

The TWICE script is optimized for fast loading and is served via a Content Delivery Network (CDN). Avoid using third-party script loaders which might affect the script’s performance and updates.

Add Your TWICE Store

After setting up the script, the next step is to add the actual store component to your website:

  1. Copy the Embed Code: From the TWICE Embed Builder, copy the embed code for your store.

  2. Choose the Location on Your Website: Determine where you want the TWICE store to appear on your webpage.

  3. Embed the Store: Paste the copied embed code into the desired location on your website. Here’s how it might look:

<!DOCTYPE html>
<html lang="en">
<head>
<!-- Add the TWICE script here -->
<script type="text/javascript" src="https://cdn.rentle.io/embed/bundle.js" defer></script>
</head>
<body>
<h1>Welcome to my website!</h1>
<!-- Add the TWICE store element here -->
<twice-store shop="yourshopname" />
</body>
</html>

That's it! Your TWICE store should now be visible and operational on your website. For further customizations, refer to the configuration parameters available on the TWICE platform.

Did this answer your question?