How to open a popup through an existing button on your Shopify store
You can make a button on your Shopify store open a Pop Convert popup. When a visitor clicks the button, the popup appears. To do this, you add one small piece of text to your button's code. This guide shows you how, step by step. You do not need to know how to code. You only need to copy and paste.
Before you start
You need:
- A popup campaign already created in Pop Convert
- The Campaign ID of that popup (you will find it in Step 1)
- Access to your Shopify admin
Step 1: Get your Campaign ID
- Log in to Pop Convert.
- Go to Popups.
- Create a popup, or open one you already made.
- Make sure the popup is saved and active.
- Find the Campaign ID and copy it. Keep it somewhere safe. You will need it in Step 3.

Step 2: Add the code to your button
To make your button open a popup, you add the pc-show-campaign attribute to the button's code. An attribute is a small piece of text inside the code. You will add your Campaign ID to it.
- Open your Shopify admin.
- In the left menu, under Sales channels, click Online Store. The Themes page opens.
- On your current theme, click Edit theme. The theme editor opens.
- Go to the page that has your button (for example, the Home page). Find the button in the preview.
- Right-click the button, then click Edit code.
- On a Mac with no right button: hold the Control key and click the button.
- The code editor opens in a new tab. It shows the code for that section, and it takes you to your button's code.
- Find the line that starts with
<aor<button. It is your button's opening tag. Click at the end of theclass="..."text, and leave a space. - Type or paste the attribute:
pc-show-campaign="YOUR_CAMPAIGN_ID"
ReplaceYOUR_CAMPAIGN_IDwith the Campaign ID you copied in Step 1.
Before:<a class="button-main2 button-shop">
After:<a class="button-main2 button-shop" pc-show-campaign="394244">
Your button's code will look different. Only add thepc-show-campaign=YOUR_CAMPAIGN_ID"part. Do not change anything else. - Click Save in the top right of the code editor.
Step 3: Test your button
- Open your store.
- Refresh the page. (Windows: Ctrl + R, Mac: Command (⌘) + R)
- Click your button.
- The popup should open.
Important rules
- Make sure your Pop Convert campaign is active and is set to Manual Trigger
- Keep the quotation marks
" ". Do not delete them. - Do not put spaces inside the quotation marks.
- Paste your own Campaign ID. Do not leave the words
YOUR_CAMPAIGN_ID.
If it does not work
Check these things, one by one:
- Campaign ID. Is it copied correctly, with no extra spaces?
- Popup status. Is the popup saved and active in Pop Convert?
- App embed. Is Pop Convert turned on in your theme settings?
- Button code. Is
pc-show-campaigninside the button's opening part, with quotation marks around the ID? - Right button. Did you edit the same button that appears on your store? Some themes use more than one version of a button, for example one for mobile and one for desktop.
Still not working? Check for errors in your browser:
- Open your store.
- Open the developer tools:
Windows | Mac |
|---|---|
F12 or Ctrl + Shift + I | Command (⌘) + Option + I |
- Click the Console tab.
- Take a screenshot of any red messages and send it to our support team.
Contact our support team through the chat in the Pop Convert app. Send us:
- Your store link
- Your Campaign ID
- A screenshot of your button's code
We are happy to help.
Updated on: 14/10/2026
Thank you!