Shopify.
Three pieces, each with its own job: the Optimads app adds the tracking code, the block in your theme makes it visible to Meta, and your own app with the API keys brings in the real orders.
- Your Optimads account, with tracking turned on.
- Admin access to your Shopify store.
- The Meta pixel selected in Optimads, under Connections. TikTok is optional.
In short
You do the first three from Tracking → Setup → Store installation → Shopify. Each row there turns green when it’s done. You do the fourth in Shopify and in Meta.
1. Install the Optimads app
Open the Shopify tab
In Optimads, go to Tracking → Setup → Store installation and pick the Shopify tab.
Press “Install the Optimads app”
Shopify opens. You pick your store and confirm the installation.
The code is in place
The app adds the code to your store and to checkout on its own. You don’t touch your theme and you don’t paste anything.
2. Turn on the Optimads block in your theme
Press “Enable in theme”
The button is on the Optimads theme block row. The theme editor opens right at App embeds.
Turn on “Optimads Tracking”
One click on the toggle next to it.
Press Save
The button is at the top right of the editor.
Check in Optimads
Go back to Optimads and press “I pressed Save, check”. The row turns green.
3. Link your own app, for real orders
Orders read straight from Shopify go to Meta and TikTok as Purchase. They’re the most accurate conversions: ad blockers can’t stop them and they don’t depend on the browser.
Create the app
Go to dev.shopify.com/dashboard with the store’s account, then Apps → Create app. The name can be anything, for example optimads-yourstore.com.
Set the App URL
Under URLs → App URL:
https://app.optimads.aiBelow it, uncheck “Embed app in Shopify admin”. The app doesn’t open inside Shopify; we only need the keys.
Paste the redirect URL
Under Allowed redirection URLs:
https://app.optimads.ai/connect/shopify/callback-byoPaste the scopes
Under API access → Scopes:
read_orders,read_products,read_inventory,read_reportsThey’re all read-only. We don’t change anything in your store.
Press Release
The settings above go live.
Choose Custom distribution
Under Distribution → Select distribution method, choose Custom distribution (not Public, the app isn’t published), type your store’s domain and save.
Required before installing. Otherwise Shopify refuses with “select a distribution method first”.Paste the keys into Optimads
Copy the Client ID and Client Secret from the app. In Optimads, on the Purchase from real orders row, press “Link the custom app (API keys)”, fill in your store address and the two keys, then press Save the keys.
Install
Press “Install in Shopify”, pick your store and press Install. You land back in Optimads, connected. We receive the token automatically.
4. Turn off the old setup
Your store should keep a single source for Meta and TikTok: Optimads.
Facebook & Instagram and TikTok
In the settings of each app, under Data sharing, turn off data sharing. Your catalog and your Facebook shop stay on.
Other pixels
In Settings → Customer events, turn off any other Meta or TikTok pixels. Remove the old pixel code from your theme.
In Meta Events Manager
Turn off Tracking without code for your pixel.
All the steps, in detail: Old pixels and duplicates.
Check
When all three rows in Tracking → Setup → Store installation are green, you’re done. The first order shows up there, under “orders received in the last 7 days”. To see how many of your real orders each pixel catches, go to Check your tracking.
Common problems
Shopify says “select a distribution method first”
You haven’t chosen the distribution method yet. Do step 6 in part 3, then press “Install in Shopify” again.
My store doesn’t show up when I install
The app has to be created from the store’s account. If you created it in another organization, go to Distribution → Generate link and open the link you get.
I installed everything, but Meta doesn’t show the sales under my campaigns
It’s almost always the theme block: it’s off, or it stayed on the old theme. See part 2.
The app row says “to reconnect”
The app is installed and the code is running. Only our connection to it has expired. Press “Reconnect the app”, without reinstalling anything.
For profit, where do I get the product costs?
From Shopify: fill in Cost per item on each product. We read it with the permissions from step 4.