Connect a client's Shopify store (agencies)
Guide for agencies: create an app in your Shopify Partner organization, install it on a client's store through a custom distribution link, then connect the store in Metrikia.
Goal
This guide is for agencies that want to connect a client's Shopify store from an app created in the agency's own Shopify organization. Your client does not have to create the app. They install it from a link you send them. The connection then happens in Metrikia with the Authorize via Shopify button, which opens a Shopify window where the access is approved. At the end, the orders, products and customers of their store sync automatically into their Metrikia account.
Your client would rather create the app in their own organization, or adds you as staff on their store? Follow the Connect Shopify to Metrikia guide instead.
Prerequisites
- A Shopify account for your agency, attached to a Partner organization. Only a Partner organization offers custom distribution (step 3): an organization created from the Dev Dashboard alone does not show it.
- Your client's technical store domain, ending in .myshopify.com (for example your-store.myshopify.com). Their custom domain does not work here.
- The store owner, or a staff member allowed to install apps, available to click the install link within 7 days of its creation.
- For the connection (step 6), a browser signed in to the Shopify admin of your client's store, with the owner's account or the account of a staff member allowed to install apps. If your agency has no such account, run that step with your client: they click Authorize via Shopify from their own browser.
- Access to your client's Metrikia account, with the right to manage its connections.
A custom distribution app serves a single store (or the stores of one Shopify Plus organization). If you work with several clients, plan one app per client.
Step 1: Create your agency's Partner organization
Your agency already has a Partner organization? Go straight to step 2.
- Create a Shopify account for your agency, ideally with a dedicated email address. Shopify also creates a trial store (My Store) along the way: you do not need it, it is not your client's store.
- Open partners.shopify.com/signup and choose that account. If Shopify offers to create a passkey, you can click Not now.
- At How would you like to get started as a partner?, choose Create and set up a new partner organization.
- At What's your main focus as a Shopify partner?, choose Provide services for existing businesses, then click Next.
- On Where's your business located?, choose your country, then click Next.
- Fill in Add your business contact information (agency name, address, email), tick I have read and agree to the Partner Program Agreement, then click Create partner organization.
Your client sees the organization name during the install. Pick a name they will recognise, usually your agency's name.
Step 2: Create the app in the Dev Dashboard
- Open dev.shopify.com/dashboard, check that your agency's organization is selected (its name is shown in the bottom left), then click Create app.
- App name: a name your client will recognise, for example Metrikia followed by your agency's name. Version name (optional) can stay empty.
- App URL: Shopify prefills https://example.com. Replace it with your agency's website address (https://...). Metrikia does not use it, but your client lands there right after the install.
- Untick Embed app in Shopify admin, which is ticked by default: the app shows no screen in the store admin.
- In Allowed redirection URL(s), paste the Metrikia redirect address: https://api.metrikia.io/api/v1/integrations/shopify/custom-app/callback. The Metrikia Shopify form also shows it, with a copy button, in I'm an agency mode. Without it, Shopify refuses the authorization in step 6.
- Keep Use legacy install flow unticked: Shopify manages the install.
- In Scopes, paste the full line: read_orders,read_products,read_customers,read_inventory
- Leave Webhooks API version on its default value, click Create app, then Release in the Release version window.
Until the version is released, the app grants access to nothing. Once released, the app's Overview page shows the Installs, Credentials, Distribution and Versions cards. With the read_orders scope alone, Shopify only exposes orders from the last 60 days: the history imported at connection time is limited to that period. For the full history, see the Update the app section.
Your app already exists, without the redirect address or without read_inventory? Open it in the Dev Dashboard, go to Versions, create a new version with the redirect address and the scopes above, then release it with Release.
Step 3: Choose custom distribution
This step is mandatory. Without custom distribution there is no install link, and Shopify shows "This app can't be installed yet. The app developer needs to select a distribution method first".
- On the app's Overview page, click the Distribution card (Select distribution method). The Distribution page opens in the Partner dashboard. The Distribution card only shows in a wide enough window: if you cannot see it, widen the browser window or switch to full screen.
- Choose Custom distribution, then click Select.
- Shopify asks for confirmation (Select custom distribution?) and warns that the choice is final (This can't be undone). Confirm with Select custom distribution.
- In Store domain, enter your client's store domain: your-store.myshopify.com
- Allow multi-store install for one Plus organization is ticked by default. Keep it ticked only if your client has several stores in one Shopify Plus organization, otherwise untick it.
- Click Generate link. If the multi-store box is ticked, confirm a second time with Generate link.
- Next to Install link, click Copy to clipboard, then send the link to the store owner.
The link expires 7 days after it is created: tell your client to install it within the week. Once the link is generated, the store domain and the multi-store option are locked: check the domain before clicking Generate link.
After your choice, the Distribution card on the Overview page may keep showing Select distribution method: do not rely on it. The Distribution page of the Partner dashboard, with its install link, is the reference.
Step 4: Your client installs the app
- Your client opens the link while logged in to their own Shopify account, not your agency's.
- If their account manages several stores, they pick the right store from the list.
- The Install app screen shows the app name, your agency's organization name and the access requested (read access to customer, product, order and inventory data).
- They click Install.
After the install, Shopify redirects your client to the app's App URL, or to a Shopify example page if the App URL was left on https://example.com. That is expected: they can close the tab. Installing the app does not connect the store yet: the connection happens in step 6.
Step 5: Copy the app credentials
- In your agency's Dev Dashboard, open the app on its Overview page.
- In the Credentials card, copy the Client ID.
- Copy the Client secret right below it, with the copy icon.
These two values give access to your client's store. Do not send them by email or chat: enter them straight into Metrikia. They stay readable in the Dev Dashboard if you need them again.
Step 6: Connect the store in Metrikia
- In your client's Metrikia account, open Settings, then My connections.
- In the E-commerce category, open the Shopify card.
- Click Connect with a custom app instead, below the main button.
- At Who is connecting the store?, choose I'm an agency.
- Fill in the 3 fields:
- Shop domain: your-store.myshopify.com, the same domain as in step 3
- Client ID: the Client ID copied in step 5
- Client Secret: the Client secret copied in step 5
- Paste the Client ID and the Client secret from the Credentials card, even if the fields look filled in already: the browser may put a saved email or password there.
- In that same browser, make sure you are signed in to the Shopify admin of your client's store (owner, or staff allowed to install apps), then click Authorize via Shopify.
- A Shopify window opens. If Shopify shows an access screen, for example Update data access, confirm it. If the app is already installed and its access has not changed, the window opens and closes on its own, without showing anything.
- The window closes and the card flips to Connected.
Do not use the Connect button for an app created in your agency's organization and installed on a client's paid store: Shopify refuses that direct connection and Metrikia shows "Shopify refused to grant access to this store". Always go through Authorize via Shopify.
If the app is not installed yet, Shopify may show an Install app screen at this step, with the app name, your agency's organization name and the access requested. The recommended path is still the install link from step 4.
Expected result
The connection is accepted and orders, products and customers start syncing automatically. The first data appears within a few minutes. Metrikia then renews its access to the store automatically: there is nothing to redo as long as the app stays installed and its access does not change. The Check Connection button on the card confirms at any time that the access still works.
Tracking pixel
On this path the pixel is not installed on the store automatically. Once the connection is established, the Metrikia Shopify card shows the code to paste: it goes into the store admin, under Settings, then Customer events. Follow the Tracking pixel section of the Connect Shopify to Metrikia guide.
Installing the pixel requires an owner or admin account, or staff with the customer events permissions. If you do not have those rights on your client's store, send them the code and the steps. Without the pixel, orders still sync, but Metrikia cannot tie a purchase back to the ad that triggered it.
Manage the connection afterwards
The Check Connection button on the Shopify card confirms that the access works. To renew the authorization or reconnect the store, open the card menu and choose Reconnect or Re-enter credentials. The form opens in I'm an agency mode, with the store domain already filled in. Paste the Client ID and the Client secret from the Credentials card if needed, then click Authorize via Shopify, again from a browser signed in to the Shopify admin of your client's store.
Update the app
Adding a scope or a redirect address goes through a new version of the app, then a new authorization:
- In your agency's Dev Dashboard, open the app, go to Versions and create a new version.
- Change the scopes or the redirect addresses, then release the version with Release.
- In Metrikia, authorize the app again: Shopify card menu, Reconnect, then Authorize via Shopify (see Manage the connection afterwards).
- Shopify shows Update data access: confirm. The window closes and the new access is active.
Without the read_all_orders scope, Shopify limits access to orders from the last 60 days. For the full history, request it in Shopify Partners: open the app, then API access requests, Read all orders scope and Request access. Once access is granted, add read_all_orders to the scopes in a new version, then authorize the app again as above.
Common problems
"Shopify rejected this Client ID and secret"
A single copy mistake is enough, including in the Client ID. Copy both values again from the Credentials card, in full and with no space before or after, and check that you did not swap them between the Client ID and Client Secret fields, nor let the browser put a saved email or password there.
"Shopify refused to grant access to this store"
You clicked Connect with an app created in your agency's organization. On a client's paid store, Shopify refuses that direct connection (Shopify error code shop_not_permitted). Use Authorize via Shopify, as described in step 6. If the message persists, check that the app is installed on the store (step 4) and that the domain entered in Metrikia is exactly the one from step 3.
"Oops, something went wrong. Unauthorized Access"
The Shopify window opened in a browser signed in to an account with no access to the client's store, often the agency's account. Sign in to the store's Shopify admin with the owner's account or the account of a staff member allowed to install apps, then click Authorize via Shopify again.
"[TFA] Unauthorized Access"
The store requires two-factor authentication on the account used. Turn it on for that Shopify account, or use an account that already has it, then click Authorize via Shopify again.
Shopify asks for an identity verification
On a development store, Shopify may show an identity verification step before it authorizes a third-party app. Follow the steps Shopify offers, then click Authorize via Shopify again.
"This app can't be installed yet"
Shopify adds that the app developer needs to select a distribution method first: custom distribution was not chosen. Run step 3, in a wide window or in full screen to see the Distribution card, then send the install link to your client.
Installation cancelled, or the Shopify window was closed
After a click on Cancel in the Shopify window (Shopify then shows that the installation was cancelled in the admin), or if the window was closed, Metrikia shows "Waiting for Shopify. Window closed or cancelled? Click "Authorize via Shopify" again.". Click Authorize via Shopify again: the authorization starts over. This time, confirm the Shopify screen. If Shopify gives no answer within 5 minutes, Metrikia shows "No answer from Shopify. Click "Authorize via Shopify" again.": do the same.
The Shopify window does not open
The browser blocked the window. Allow pop-ups for Metrikia in the browser settings, or turn off the blocker on that page, then click Authorize via Shopify again.
The Dev Dashboard opens on the wrong organization
Opened from a store admin, the Develop apps in the Dev Dashboard link leads to the organization of the signed-in account, not to the store's. Check the organization name in the bottom left of the Dev Dashboard and switch organization if needed before you create or change the app.
After the install, my client lands on an example page
That is expected: Shopify redirects to the app's App URL, or to a Shopify example page if the App URL was left on https://example.com. Your client can close the tab. The connection then happens in step 6.
The install link has expired
The link is valid for 7 days. After that, go back to the app's Distribution page in the Partner dashboard and generate a new link. The store domain is already locked, so it stays the same. Send the new link to your client.
Your client cannot install the app
The account that opens the link must be the store owner's, or a staff member allowed to install apps (Manage and install apps and channels permission). The link only works for the store entered in step 3: opened on another store, it is refused.
The domain entered in step 3 is wrong
The domain can no longer be changed once the link is generated. Create a new app (step 2) and run custom distribution again with the right domain.
I want to connect another client
A custom distribution app serves one store (or one Shopify Plus organization). Go back to step 2 and create a new app for each client.
Next step
Your client's Shopify data is now in Metrikia. Cross-reference it with their campaigns in ADS to measure their store's real ROAS. Questions along the way? Ask Diana from the help menu.
Previous guide
Connect Shopify to Metrikia
Next guide
Connect your custom ecommerce stack through the ingestion API
To go further, check out our blog, the documentation or contact support.