Fix: Meta Connection Pulling Wrong Domain or Theme Info
Overview
In some cases, when you attempt to connect Agency AI to Meta, the authorization process pulls an incorrect store reference — such as a developer's preview domain, a theme template name, or a myshopify.com subdomain — instead of your actual store domain. This causes the connection to fail because Meta can't match the reference to your verified business assets.
Who This Affects
This issue is most common for merchants whose Shopify store theme was built by a third-party developer or purchased from a theme marketplace. During development, themes are often built under the developer's own Shopify account or preview environment. When the finished theme is transferred or published to your store, some of the developer's original references can persist in the theme's code or metadata.
How to Identify the Issue
You may be experiencing this issue if:
- The Meta authorization pop-up shows a store name or domain you don't recognize
- You see an "Unable to Connect Store Link" error during authorization
- The connection attempt references a name or URL associated with your theme developer rather than your store
- The Meta Shopify App also fails to connect or shows incorrect store information
How to Fix It
Step 1: Confirm Your Shopify Domain Settings
Start by making sure Shopify itself has the correct domain configured:
- Go to Settings > Domains in your Shopify admin.
- Confirm your custom domain (e.g., yourstorename.com) is set as the Primary domain.
- If your .myshopify.com URL is still the primary, click "Change primary domain" and select your custom domain.
Step 2: Audit Your Theme Code
- In your Shopify admin, go to Online Store > Themes.
- Click the three dots next to your published theme and select Edit Code.
- Check the following files for incorrect references:
- Layout > theme.liquid — Look for any hardcoded URLs, meta tags, or domain references in the
<head>section. - Config > settings_data.json — Search for any URLs or store names that reference the developer's domain.
- Snippets — Check any custom snippets for hardcoded domain references.
- Layout > theme.liquid — Look for any hardcoded URLs, meta tags, or domain references in the
- Replace any incorrect references with your actual store domain and save.
Step 3: Check Your Theme's Metadata
- Go to Online Store > Themes.
- Look at the name and description of your published theme. While cosmetic, this can sometimes indicate whether the theme is still carrying developer-specific settings.
- If the theme name references the developer, you can rename it by clicking Customize and updating the theme name.
Step 4: Clear Meta's Cached Data
Meta may have cached an incorrect store reference from a previous connection attempt:
- Go to Meta Business Suite > Business Settings.
- Navigate to Accounts > Pages and check if your store's correct domain appears.
- Go to Data Sources > Pixels and verify the Pixel is associated with your correct domain.
- Remove any assets or connections tied to the incorrect domain.
Step 5: Reinstall the Meta Shopify App
- Uninstall the Meta Facebook & Instagram app from your Shopify store.
- Reinstall it from the Shopify App Store.
- Walk through the setup process — it should now pull your correct store domain.
Step 6: Reconnect Agency AI
After confirming the Meta Shopify App is connected with the correct domain:
- Open Agency AI in your Shopify admin.
- Click "Connect to Meta" and complete the authorization.
- Verify that the correct domain and business assets appear in the connection flow.
Preventing This Issue
When working with theme developers in the future, ask them to remove all development-specific URLs, references, and metadata before transferring the theme to your store. This includes preview domains, test Pixel IDs, and any hardcoded links in the theme code.
Need Help?
If you're not comfortable editing theme code, our support team can help you identify and resolve the incorrect references. Reach out with your store URL and a description of what you're seeing during the connection process.