Articles on: FAQs

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

  1. Log in to Pop Convert.
  2. Go to Popups.
  3. Create a popup, or open one you already made.
  4. Make sure the popup is saved and active.
  5. Find the Campaign ID and copy it. Keep it somewhere safe. You will need it in Step 3.


Pop Convert campaign ID

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.


  1. Open your Shopify admin.
  2. In the left menu, under Sales channels, click Online Store. The Themes page opens.
  3. On your current theme, click Edit theme. The theme editor opens.
  4. Go to the page that has your button (for example, the Home page). Find the button in the preview.
  5. Right-click the button, then click Edit code.
    • On a Mac with no right button: hold the Control key and click the button.
  6. The code editor opens in a new tab. It shows the code for that section, and it takes you to your button's code.
  7. Find the line that starts with <a or <button. It is your button's opening tag. Click at the end of the class="..." text, and leave a space.
  8. Type or paste the attribute:


    pc-show-campaign="YOUR_CAMPAIGN_ID" 


    Replace YOUR_CAMPAIGN_ID with 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 the pc-show-campaign=YOUR_CAMPAIGN_ID" part. Do not change anything else.
  9. Click Save in the top right of the code editor.


Step 3: Test your button

  1. Open your store.
  2. Refresh the page. (Windows: Ctrl + R, Mac: Command (⌘) + R)
  3. Click your button.
  4. 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:

  1. Campaign ID. Is it copied correctly, with no extra spaces?
  2. Popup status. Is the popup saved and active in Pop Convert?
  3. App embed. Is Pop Convert turned on in your theme settings?
  4. Button code. Is pc-show-campaign inside the button's opening part, with quotation marks around the ID?
  5. 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:

  1. Open your store.
  2. Open the developer tools:

Windows

Mac

F12 or Ctrl + Shift + I

Command (⌘) + Option + I

  1. Click the Console tab.
  2. 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

Was this article helpful?

Share your feedback

Cancel

Thank you!