You can integrate the Adjust Smart Banner SDK into Shopify to distribute smart banners via Shopify tags. Follow the steps in this guide to set this up.
Integrate the SDK in Shopify
-
Navigate to your store admin tools at https://admin.shopify.com.
-
Select Online Store -> Themes.
-
Select the three dot menu on your active theme and select Edit code.
-
Find and open the
theme.liquid
file. -
Add the SDK loading snippet inside the theme’s
<head></head>
tags. -
Scroll down to the theme’s
<body>
tag and enter your SDK initialization call. This call must include an appToken. Check out the SDK initialization options to configure the SDK using theinit
method. -
Save your changes.
The snippet in this example adds a new divider with the ID AdjSbRoot
. This divider is used as the parent of the smart banner. You should set this to prevent the Shopify header from overlaying the smart banner. You can apply styles to the banner parent or choose a different parent element. If you don’t add a parent element, the smart banner attaches to document.body
.