Alia loads on your store through a small script. On Shopify, the Alia app embed adds it for you. If the app embed is on but Alia still doesn't load, or your store isn't on Shopify, you can add the script to your site yourself. This article shows you how, and how to check that it's working.
When to add the script manually
Add the script yourself if any of these apply:
The app embed is on, but Alia doesn't load. You've turned on and saved the Alia app embed on your live theme, but Alia still shows Not embedded, popups don't appear even with ?alia=1 added to your store's address, and the popup preview doesn't open on your site. Page builders such as Shogun, PageFly, and GemPages, and other apps that manage your theme, can stop the app embed from loading.
Your Shopify storefront is headless. App embeds only work on Shopify themes, so a custom storefront needs the script added to its code.
Your store isn't on Shopify. Every non-Shopify site adds Alia with the script. If your store is on Magento, use the Alia module instead. See Connecting your Magento store to Alia.
Copy your Alia script
Your script is unique to your store, so copy it from Alia rather than from another store or article.
In Alia, go to Settings → General → Embed Alia.
If you're on Shopify, select Headless or non-Shopify. Non-Shopify stores see the script right away.
Copy the script.
The script is a single line that looks like this, with your own store's ID at the end:
<script src="https://app.aliapopups.com/public/embed.js?shop=your-store-id" async></script>
Add the script to your Shopify theme
In your Shopify admin, go to Online Store → Themes.
On your live theme, select … → Edit code.
Under Layout, open theme.liquid.
Paste the script on its own line, just before the closing
</head>tag.Select Save.
Keep the Alia app embed turned on. Alia only starts once on a page, so having both doesn't load it twice, and the app embed is what lets Alia read Shopify details like a visitor's market and language.
💡 Note: The script only applies to the theme you added it to. If you publish a new theme, add the script to that theme's theme.liquid too.
Add the script to a non-Shopify or headless site
Paste the script inside the <head> of every page where Alia should run. Most platforms have one place to add code to every page, such as a site-wide header or custom code setting, a theme layout file, or a tag manager. Put it there rather than on individual pages.
If you're not sure where your site's <head> is, send the script to your developer or website platform's support.
For embedded forms on a non-Shopify site, you also place a separate snippet where the form should appear. See Adding an Embedded Form to a non-Shopify site.
Check that Alia is loading
Open your store in a private or incognito window.
Add ?alia=1 to the end of the address, for example
yourstore.com/?alia=1. If you have a live campaign that matches the page, its popup opens right away.To check the script itself, right-click the page, select View page source, and search for
embed.js. If it's there, the script is on the page.
On a non-Shopify site, the Embed Alia window also confirms the script once someone visits your site: "Alia embed script detected. You're all set!" Open your site in a new tab to help it confirm.
Troubleshooting
The script is on the page, but popups still don't show
Your store's Content Security Policy (CSP) may be blocking Alia, or the cause may be in your campaign settings rather than the script. See My popup isn't showing on my store for the CSP domains to allow and the other common causes.
I can't find the script in my page source
Check that you saved theme.liquid on your live theme, not a draft or duplicate theme. If your site uses a page builder or caching app, clear its cache and load the page again.
Popups show for me but not for someone else
Ad blockers and script blockers can stop Alia from loading for some visitors. Test in a private window with extensions turned off.
Still have questions?
Start a chat from inside the Alia app, or use the chat in our Help Center.


