Connect a client's Shopify store (agencies) | Guides
Intermediate7 min

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 only click an install link. 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.
  • 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.

  1. 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.
  2. Open partners.shopify.com/signup and choose that account. If Shopify offers to create a passkey, you can click Not now.
  3. At How would you like to get started as a partner?, choose Create and set up a new partner organization.
  4. At What's your main focus as a Shopify partner?, choose Provide services for existing businesses, then click Next.
  5. On Where's your business located?, choose your country, then click Next.
  6. 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

  1. Open dev.shopify.com/dashboard, check in the top left that your agency's organization is selected, then click Create app.
  2. App name: a name your client will recognise, for example Metrikia followed by your agency's name. Version name (optional) can stay empty.
  3. App URL: enter for example your agency's website address (https://...). Metrikia does not use it, but your client lands there right after the install. If Shopify also requires a value in Allowed redirection URL(s), reuse the same address.
  4. Untick Embed app in Shopify admin: the app shows no screen in the store admin.
  5. Keep Use legacy install flow unticked: Shopify manages the install.
  6. In Scopes, paste the full line: read_orders,read_products,read_customers
  7. 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, Shopify only exposes orders from the last 60 days: the history imported at connection time is limited to that period.

Step 3: Choose custom distribution

  1. On the app's Overview page, click the Distribution card (Select distribution method). The Distribution page opens in the Partner dashboard.
  2. Choose Custom distribution, then click Select.
  3. Shopify asks for confirmation (Select custom distribution?) and warns that the choice is final (This can't be undone). Confirm with Select custom distribution.
  4. In Store domain, enter your client's store domain: your-store.myshopify.com
  5. 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.
  6. Click Generate link. If the multi-store box is ticked, confirm a second time with Generate link.
  7. 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.

Step 4: Your client installs the app

  1. Your client opens the link while logged in to their own Shopify account, not your agency's.
  2. If their account manages several stores, they pick the right store from the list.
  3. The Install app screen shows the app name, your agency's organization name and the access requested (read access to customer, product and order data).
  4. They click Install.
After the install, Shopify redirects your client to the app's App URL. That is expected: they can close the tab, there is nothing else for them to do.

Step 5: Copy the app credentials

  1. In your agency's Dev Dashboard, open the app on its Overview page.
  2. In the Credentials card, copy the Client ID.
  3. 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

  1. In your client's Metrikia account, open Settings, then My connections.
  2. In the E-commerce category, open the Shopify card.
  3. Click Connect with a custom app instead, below the main button.
  4. 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
  5. Click Connect: the card flips to Connected.

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. 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.

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.

"Shopify refused to grant access to this store"

The app is not installed on the store yet. Ask your client to complete step 4, then click Connect again. Also check that the domain entered in Metrikia is exactly the one from step 3.

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.

To go further, check out our blog, the documentation or contact support.

Ready to take action?

Create your Metrikia account and apply this guide in minutes.