1. Help Center
  2. Embedding
  3. Embedding with HTML code

Embedding Twice on your website

how to embed your Twice Store on your website by editing its HTML code

On this Page

  1. Open the Twice embed builder
  2. Add the script tag
  3. Add your Twice store

1. Open the Twice Embed Builder

The Twice embed builder at embed.rentle.shop provides you with the correct code snippets that you can easily copy and then paste into your website's HTML code.

Here is how to use the Twice Embed Builder ->

2. Add the script tag

  1. Copy the script tag from the Twice Embed Builder.
  2. On your website, navigate to the <head></head> section of your index.html page.
  3. Paste the script tag to the <head></head> section.

In a simple HTML file, that could look like the example below:

<!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>

Note: The Twice script is already optimized (minified and gzipped) and served via a Content Delivery Network (CDN). Using 3rd party script loaders like NitroPack or WP Rocket will not significantly speed up your website, and may leave you with an outdated version of the script.

3. Add your Twice store

  1. Copy the code snippet for embedding your store from the Twice Embed Builder.
  2. Navigate to the location on your page on which you would like your Twice store to be displayed.
  3. Paste the code snippet to the chosen section of your page

Again, in a simple HTML file that could look like below:

<!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! You should now have your Twice online store visible on your website.

For additional modifications see all configuration parameters here.

Having difficulties? Check our FAQs & troubleshooting guide -->