Installing your ShortStack embed code globally (so it loads on every page of your site) gives you the most flexibility. Once installed:
You can publish popups without ever editing your site again.
Inline campaigns only require dropping a single
<div>where you want the campaign to appear.You avoid the hassle of editing individual pages or re-installing the code later.
Best practice: Place your embed code in the Footer or just before the closing </body> tag. This ensures the script loads after your page content and reduces conflicts.
After installation, be sure to publish changes and clear any caches (site cache, plugin cache, or CDN cache) so your updates show right away.
WordPress
WordPress powers millions of sites, and the easiest way to add site-wide code is through a plugin.
Steps:
Log in to your WordPress Admin Dashboard.
Install and activate a plugin such as WPCode – Insert Headers & Footers.
From the plugin’s settings, open the Header & Footer code areas.
Paste your ShortStack embed code into the Footer box.
Save changes, then clear any cache if you’re using a caching plugin or CDN.
Shopify
Shopify requires adding your embed code to your theme so it loads on every page.
Steps:
From the Shopify admin, go to Online Store → Themes.
Next to your active theme, click Actions → Edit code.
Open the file layout/theme.liquid.
Paste your embed code just above the closing
</body>tag.Click Save. Your code will now load across your store.
Wix
Wix allows custom code through its dashboard.
Steps:
Go to your site Dashboard → Settings → Custom code.
Click Add Custom Code.
Paste your ShortStack embed code.
Choose Place Code in: Body – end.
Select All Pages.
Save and Publish your site.
Squarespace
Squarespace provides a global code injection tool.
Steps:
From the main menu, go to Website → Pages → Custom Code → Code Injection.
Paste your embed code into the Footer box.
Click Save.
Note: Code Injection is available on paid Squarespace plans only.
Webflow
Webflow lets you insert site-wide code from your project settings.
Steps:
Open your Project Settings.
Navigate to the Custom Code tab.
Paste your embed code into the Footer Code section.
Save changes.
Publish your site to push the update live.
BigCommerce
BigCommerce has a built-in Script Manager for global scripts.
Steps:
From the admin, go to Storefront → Script Manager.
Click Create a Script.
Set Location to Footer and Pages to All Pages.
Paste your embed code into the script content field.
Save.
Magento / Adobe Commerce (Magento 2)
Magento allows adding code through the design configuration.
Steps:
Go to Content → Design → Configuration in the admin panel.
Edit your active store view.
Under Other Settings → Footer → Miscellaneous HTML, paste your embed code.
Click Save Configuration.
Go to System → Cache Management and Flush Cache.
HubSpot CMS
HubSpot CMS lets you add scripts globally via footer settings.
Steps:
In HubSpot, go to Settings → Advanced.
Find Site footer HTML.
Paste your embed code.
Save changes.
Duda
Duda provides site-wide code areas for headers and footers.
Steps:
Open your site in the Duda editor.
Go to Settings → Site Settings → Body-End HTML.
Paste your embed code into the Body-End HTML box.
Publish your site.
Drupal
Drupal requires a module for header and footer code.
Steps:
Install and enable a module such as Header and Footer Scripts.
In the configuration screen, find the Footer Scripts field.
Paste your embed code.
Save configuration.
Clear your Drupal cache so the code takes effect immediately.
Square/Weebly
- Click Theme in the top menu.
- In the lower left corner, click the Edit HTML / CSS button.
- Look for a file named header.html in the sidebar and click it to open it in the file editor.
- Scroll to the bottom and paste our global embed code just before the closing body tag
</body>. - Click Save in the upper-right corner to save the theme.
Other Platforms and Custom Sites
If you’re using a developer-focused platform or hosting service, the process may look different. Here are a few common scenarios:
Static Hosts (Netlify, GitHub Pages, etc.)
Add the embed code to your global HTML layout file (e.g.,
baseof.htmlin Hugo,_layouts/default.htmlin Jekyll).Place it before the closing
</body>tag to ensure it runs on every page.
Vercel / Next.js / React Apps
Add the embed to your global layout file, usually
_document.jsor_app.js.If you import it into a
.jsfile instead of HTML, remove the<script>and</script>tags, and include only the JavaScript inside.
Custom CMS or Frameworks
Place the embed code in your main template:
Rails:
app/views/layouts/application.html.erbLaravel:
resources/views/layouts/app.blade.phpDjango:
templates/base.htmlJoomla: edit
index.phpin your active template
Always place it before the closing
</body>tag.
Blogger, GoDaddy Builder
Blogger: Go to Theme → Edit HTML, and add before
</body>.GoDaddy Website Builder: Use Site-wide Code Injection under Settings.
After Installation
Verify: Open your homepage and another page of your site, then view the page source or use browser dev tools to confirm the embed is present.
Inline campaigns: Add the ShortStack
<div>only where you want inline content to display.Popups: No extra steps are needed — once the global embed is installed, they’ll work across your site.
FAQS
1. How does the global embed code work?
Think of the embed code like a smart assistant for your website. When someone visits your page:
- The code wakes up and checks which ShortStack campaigns you've set up
- It downloads a list of your active campaigns from ShortStack's servers
- It watches your webpage for special placeholder spots you've designated
- When it finds one, it inserts your ShortStack campaign into that spot
- For popup campaigns, it waits for the right moment before showing them
The campaigns themselves appear in a protected "window within a window" (iframe), keeping your website and the campaign content separate and safe.
2. Does it capture any information or track visitors' behavior?
Very minimal, and it stays on the visitor's device: The code only remembers how many times someone has seen a specific campaign and when they last saw it. This is stored only on the visitor's browser.
What it does NOT do: Track visitors across different websites, collect personal information, set marketing cookies, or send data to analytics services.
3. What functionality does the global embed code enable?
The embed code lets you show campaigns inside your webpage, display popup campaigns (center, sliding, or notification bars), and control when popups appear based on time, scroll depth, exit intent, or specific page location.
4. Are there any security implications or concerns?
The embed code is designed with security in mind: Campaigns run in a protected space, your website's styling stays separate, and the code has no access to sensitive information like passwords or private form data.
5. What security headers are being added to the page?
None. The embed code is like a guest on your website—it can add content, but it cannot change your website's security settings. Those are controlled by your web server.
6. What JavaScript or CSS libraries are being used?
The embed code is completely self-contained and uses no external tools or libraries. This prevents conflicts with other tools, ensures a smaller footprint for faster loading, and reduces potential security vulnerabilities.