How to add a pop-up on Shopify?

How to add a pop-up on Shopify?
Maxwell Reed

Maxwell Reed

May 23 2023


Adding a pop-up to your Shopify store can be done either by coding or using a Shopify app. Coding requires editing the theme.liquid file, while apps offer a user-friendly interface to create and manage pop-ups.

To add a pop-up to your Shopify store, follow these steps:

1. Log in to your Shopify admin panel.

2. To access the online store from the admin panel, click on "Online Store" in the left-hand sidebar.

3. In the Online Store section, click on "Themes."

4. In the Themes section, locate the theme you are currently using and click on the "Actions" button (3 dot) beside it. Then select "Edit code." 

Note: It's always good practice to create a backup of your theme before making any changes. You can do this by duplicating your theme.

5. In the code editor, navigate to the "Layout" folder and open the "theme.liquid" file.

6. Within the "theme.liquid" file, find the closing tag.

7. Just before the closing tag, insert the following code:

window.onload = function() {

var popup = document.createElement('div');

// Customize the content and styling of your pop-up

popup.innerHTML = '

This is your pop-up content.

'; = 'white'; = 'black'; = '300px'; = '200px'; = 'fixed'; = '50%'; = '50%'; = 'translate(-50%, -50%)';



Customize the content and styling of your pop-up by modifying the innerHTML, background color, text color, width, height, position, and other CSS properties of the popup element.

8. Save the changes to the "theme.liquid" file.

9. Preview your store to see the pop-up in action. Before making your changes live, use the "Preview" button at the top of the code editor to view your changes.

10. If you are satisfied with the appearance of the pop-up, click "Save" to make the changes live on your Shopify store.

Remember, this is a basic implementation of a pop-up and may not include advanced features such as exit intent triggers or timed delays. If you require more advanced functionality, you may want to consider using a Shopify app or seeking assistance from a developer.

If you prefer to add a pop-up on Shopify without coding, you can use a Shopify app that offers pop-up functionality. Here's how:

  1. Log in to your Shopify admin panel.
  2. From the admin panel, click on "Apps" in the left-hand sidebar.
  3. Click on the "Recommended Apps" option.
  4. In the "Apps" section, click on "Shopify App Store", which is located at the bottom.
  5. To find a pop-up app in the Shopify App Store, simply search for one. There are several popular options available, including Privy, Poptin, and Justuno. Choose an app that meets your requirements and has good reviews.
  6. To install the app, follow the instructions provided by the app developer. While each app may have a slightly different installation process, it usually involves clicking on the "Add app" or "Install app" button and granting necessary permissions.
  7. After installing the app, configure your pop-up settings. This usually involves customizing the content, design, triggers, and targeting options for your pop-up.
  8. Preview and test your pop-up to ensure it appears as desired on your store.
  9. After you are satisfied with the configuration, activate the pop-up to make it live on your Shopify store.

Using a pop-up app eliminates the need for coding and provides a user-friendly interface for creating and managing pop-ups on your Shopify store. To fully engage your customers, explore the features and capabilities of the chosen app and leverage its full potential.

Maxwell Reed


Maxwell Reed

Maxwell Reed a growth engineer is helping online stores with insights and recommendations to help implement conversion rate optimisation tactics.