> ## Documentation Index
> Fetch the complete documentation index at: https://help.the-meridian.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These are the public docs of Meridian for Shopify apps: hosting, billing (Plan Builder and the @the-meridian/sdk package), CRM, emails and automations for Shopify app developers.
> Start with these pages: Meridian MCP (https://help.the-meridian.ai/mcp-server.md) to connect a coding agent, AI coding agents (https://help.the-meridian.ai/ai-agents.md) for the agent skill, SDK quickstart (https://help.the-meridian.ai/sdk-quickstart.md), Running your app with the CLI (https://help.the-meridian.ai/cli-dev.md), Deployment (https://help.the-meridian.ai/deployment.md), and Errors (https://help.the-meridian.ai/errors.md) to look up an error code or message.
> Fetch one page at a time as Markdown (the page URL followed by .md), using the index in https://help.the-meridian.ai/llms.txt. llms-full.txt holds every page in one file of about 900 KB, so avoid loading it whole.
> With Meridian MCP connected, search these docs with docs_search and docs_get, and read live facts (feature and event keys, plan ids, environments, deployments, logs) from the MCP tools instead of guessing them.

# Google Analytics 4 for your Shopify app listing

> Connect your listing's Google Analytics 4 property to see listing visits, install clicks and where each store first found your app.

Shopify sends your App Store listing's traffic to the Google Analytics 4 property you name on the listing. Connecting that property to Meridian adds two things to Analytics:

* the top of your install funnel: **listing visitors** and **install clicks**, by day, by App Store surface (search, category, collection, another app's listing, ads) and by source;
* **how each store found you**: for every install Shopify reports to Google Analytics with the store's id, the first source Google recorded for that merchant, shown on the store page and usable as a filter and a dimension in the [Report Builder](https://help.the-meridian.ai/report-builder.md).

Installs, trials, paid conversions and revenue keep coming from your Shopify Partner data. Google Analytics never adds or removes an install.

The connection is per app, on public apps, on the plans that include Analytics. It is read-only: Meridian asks Google for one permission, **See and download your Google Analytics data**, and never changes anything in your property.

## Before you connect

Three settings decide what Meridian can read. Each one only collects data from the day you turn it on: Google Analytics does not fill in the past.

1. **Measurement ID on the listing.** In the Partner Dashboard, open **Apps**, your app, **Distribution**, **Manage listing**, your listing, then **Tracking information**. Paste your property's `G-` measurement ID in **Google analytics code** and save. This sends listing visits and install clicks.
2. **Measurement Protocol API secret on the listing.** In Google Analytics, open **Admin**, **Data streams**, the stream with that measurement ID, then **Measurement Protocol API secrets**, and create one. Paste it in the same **Tracking information** section and save. Without it Shopify sends no install event, and no store can be traced to a source.
3. **Custom dimensions.** In Google Analytics, open **Admin**, **Custom definitions**, and create four **event-scoped** custom dimensions with these exact event parameters: `shop_id`, `api_key`, `surface_type` and `surface_detail`. The first two tie an install to a store; the last two carry the App Store surface and the search term of ads and installs.

Shopify notes that parameters can take up to 24 hours to appear in Google Analytics after you set them up.

## Connect

Open your app's **Settings**, then **Integrations**, and click **Connect** on the **Google Analytics** card.

1. **Google sign-in.** Google's consent screen opens in a new tab. During the beta it first shows **Google hasn't verified this app**: click **Advanced**, then **Go to Meridian**. The warning stays until Google finishes its review of the read-only permission and does not change what Meridian can read.
2. **Pick the property.** Meridian lists the properties your Google account can read, with each web stream's measurement ID. Pick the one that matches the measurement ID on your listing. If the account you signed in with has no GA4 property, click **Connect another Google account** and choose the account that has access to it.
3. **First check.** Meridian reads the last 30 days and shows what it found: listing visits, install events, whether the install events carry this app's Shopify client ID, and which custom dimensions exist and with which scope. A property whose install events all belong to another app is refused for this app.

After the first check, Meridian imports up to 14 months of history in the background, a month or two per hour, newest first, so a new connection never uses up your property's hourly allowance at once.

Connecting and disconnecting need the **integrations** permission. Reading the connection's status also works with the **analytics** permission.

## What the card shows

Once connected, the card names the property, its measurement ID and who connected it, and lists what Meridian receives:

| Line | Meaning |
| - | - |
| **Listing visits and Install clicks** | Listing visits arrived in the last 30 days, with the date of the latest. |
| **Install events with the store id** | Install events arrived, and how many of the month's installs (from Shopify) were traced to a store. |
| **Custom dimensions** | Whether `shop_id`, `api_key`, `surface_type` and `surface_detail` exist with Event scope. |

Until all four exist, the line becomes a table with each dimension's status in the property: **Created**, **Missing**, or **Wrong scope** when it was created with User or Item scope (Google Analytics cannot report it on install events, so create it again with Event scope). **Check again** reads the property's dimensions right away instead of waiting for the hourly sync; it uses no report quota. Google Analytics only collects a dimension from the day it is created, so nothing before that day can be recovered.

The card also shows the date history starts from and the property's time zone.

## How it syncs

Meridian reads your property every hour. Each read covers the last 3 days, because Google Analytics processes data for 24 to 48 hours and can revise it for several days. Once a day Meridian reads days 4 to 8 again and marks them final. A day re-read replaces what was there: numbers can move during those days, they are never counted twice.

Days are your property's days, in the property's time zone. Meridian's other Analytics figures use UTC days, so a day's listing visits and its installs can sit up to a day apart.

When Google folds rare page addresses into one **(other)** row, or withholds small counts, the day is marked **partial**.

**Sync now** on the card queues a read straight away. It is limited to a few per hour per app, because your own Google Analytics tools share the same hourly allowance.

## What is counted

* **Listing visitors** are Google Analytics users who opened your listing page (the `page_view` event on your listing's address, its reviews page included). Over a range, visitors are the sum of each day's users, not unique visitors across the range.
* **Install clicks** are the `Add App button` events Shopify sends when a merchant clicks **Install**. Browsers drop some of these as the page navigates away, so install clicks can be fewer than installs. Meridian shows both as they are and never caps one by the other.
* **Ad clicks** are the `shopify_app_ad_click` events Shopify sends when a merchant arrives from an App Store ad.
* **Installs** stay the Shopify installs from your Partner data. The Google Analytics install event is only used to attach a source to a store.

Visitors and clicks are anonymous: they can be counted by day and by source, never listed as stores. Rates between listing steps and installs compare two separately counted populations, so Meridian labels them **indicative**.

### The App Store surface

Shopify adds the surface a merchant came from to your listing's address. Meridian reads it and groups visits as **App Store search**, **Search ads**, **Category pages**, **Collections**, **App Store home**, **Other listings**, **Partners page** and **Outside the App Store**. For a search, the merchant's search term is kept, lowercased. Values that are not Shopify's are ignored.

### Channels

Each visit and each traced store gets a channel: App Store, App Store ads, Shopify admin (the App Store inside the admin and Sidekick), web search, AI assistant, social, email, paid, campaign (a tagged link), referral or direct. The App Store surface decides first; then the link's UTM tags; then Google Analytics' own source and medium.

## How a store is traced

When a merchant installs, Shopify sends an install event with the store's id, its address and your app's Shopify client ID. Meridian:

1. keeps the event only if it carries your app's client ID. Several listings can share one property, so an event with another app's client ID, or with none, is dropped. Until the `api_key` custom dimension exists, no event carries it: Meridian then reads no install events and no ad clicks, and every install shows as **Not traced**;
2. finds the store by its id among your app's stores from Shopify, or else by its address;
3. records the first source Google Analytics knows for that merchant, the first visit date, and the App Store surface when the custom dimensions carry it.

A store is never created from Google Analytics data. A store whose data Shopify asks to erase (the `shop/redact` request) loses its source and is not traced again from that install; if it installs again later, the new install is traced. An install with no matching event is shown as **Not traced**: it stays in every count, it just has no source. A store that reinstalls takes the source of its latest install.

Expect some installs to stay untraced even with everything set up: merchants who refuse cookies, block trackers, or install from another device than the one they browsed on.

## When something breaks

| Status | What happened | What to do |
| - | - | - |
| **Reconnect needed** | Google stopped accepting Meridian's access: it was removed, the person who connected left the property, or the grant expired. Syncing pauses, imported data stays, and the app's owners and admins get one email. | Click **Reconnect** and sign in with an account that can read the property. |
| **Property missing** | The property was deleted or moved. | Pick the property again. |
| **Paused for an hour** | Google's hourly allowance for the property ran out. Your own Google Analytics tools share it. | Nothing: Meridian resumes at the next hour. |
| **Waiting for listing visits** | No listing visit in the last 30 days. | Check the measurement ID on the listing. |
| **Waiting for install events** | Shopify reports installs, Google Analytics none. | Add the Measurement Protocol API secret to the listing. Listing visits still show; every install counts as Not traced meanwhile. |
| **No listing visits for 3 days** | Installs continue but visits stopped. | The listing may now send to another measurement ID: compare it with the one on the card. |

If Google itself fails several times in one read, Meridian stops that read and tries again the next hour.

## Disconnect

**Disconnect** on the card revokes Meridian's access at Google and removes the stored credentials immediately. The listing visits and store sources already imported are kept for 30 days, so a reconnect within that time picks up where it left off, then deleted.

When Shopify sends the `shop/redact` request for a store, its traced source is deleted.

## What Meridian stores

* Daily counts of listing visitors, install clicks, ad clicks and install events, by source, surface, search term, locale and country.
* For each traced store: its Shopify store id, install date, first visit date and first source.
* The connection: property, stream and measurement ID, the Google refresh token (encrypted), and who connected it.

Meridian stores no Google Analytics user or browser id. Your Google Analytics data is shown only to your organization's members with access to the app, and is not used for anything else.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.