← Documentation

Installing SimpleData on Shopify

One-click setup: auto-install the tracker and sync order revenue without Shopify Plus

✅ Recommended: One-click integration

The integration panel in your dashboard installs the tracker automatically via Shopify's Script Tag API and syncs all paid orders. No theme editing or Shopify Plus required.

Prerequisites

  • •A Shopify store with admin access
  • •A SimpleData account with an Ecommerce site

Method A: One-Click Integration (Recommended)

Step 1: Create your Ecommerce site in SimpleData

  1. Log in to the SimpleData Dashboard
  2. Go to Sites → create a new site and set the type to Ecommerce
  3. Open the site dashboard — you will see the Shopify Integration panel at the top

Step 2: Create a Shopify Custom App

  1. From your Shopify Admin, go to Settings → Apps and sales channels
  2. Click "Develop apps" → "Create an app" and give it a name (e.g. SimpleData)
  3. Under "Configuration" → "Admin API access scopes", enable: read_orders, read_products, write_script_tags
  4. Click "Install app" — Shopify will generate the access token
  5. Copy the "Admin API access token" (it is shown only once)

⚠️ Save the token immediately — Shopify shows it only once after installation.

Step 3: Connect in the dashboard

  1. In the Shopify Integration panel, enter your store domain (e.g. mystore.myshopify.com)
  2. Paste the Admin API access token
  3. Click "Connect Shopify"

✅ That's it! SimpleData will automatically install the tracker on every storefront page and begin importing your order history in the background.

What happens after connecting

  • Tracker auto-installed via Script Tag — no manual theme edits needed
  • Full order history imported in the background (appears within a few minutes)
  • New paid orders synced automatically every hour
  • Disconnect at any time — the tracker is removed from your store automatically

Method B: Manual Installation (Fallback)

Use this if you prefer not to create a Custom App or if your store has restrictions on Script Tags.

1. Add the tracker to theme.liquid

  1. From Shopify Admin, go to Online Store → Themes
  2. Click Actions → Edit code on your active theme
  3. Find Layout → theme.liquid in the left sidebar
  4. Locate the </head> closing tag and paste the snippet just before it:
<!-- SimpleData Analytics -->
<script async src="https://api.simpledata.dev/t.js"></script>

2. Track purchases (Shopify Plus only)

The "Additional scripts" field in Settings → Checkout is only available on Shopify Plus. If you don't have Shopify Plus, use Method A — the integration syncs orders via the API regardless of plan.

Paste this into Settings → Checkout → Additional scripts:

<script>
(function() {
  var checkTracker = setInterval(function() {
    if (window.simpleAnalytics && window.simpleAnalytics.trackPurchase) {
      clearInterval(checkTracker);
      window.simpleAnalytics.trackPurchase({
        revenue: {{ checkout.total_price | money_without_currency | remove: ',' }},
        currency: '{{ checkout.currency }}',
        orderId: '{{ order.name }}',
        products: [
          {% for line_item in checkout.line_items %}
          {
            id: '{{ line_item.product_id }}',
            name: '{{ line_item.title | escape }}',
            quantity: {{ line_item.quantity }},
            price: {{ line_item.final_price | money_without_currency | remove: ',' }}
          }{% unless forloop.last %},{% endunless %}
          {% endfor %}
        ]
      });
    }
  }, 100);
  setTimeout(function() { clearInterval(checkTracker); }, 5000);
})();
</script>

Verify Installation

Test pageview tracking

  1. Visit your store in an incognito window and navigate a few pages
  2. Open your SimpleData dashboard — pageviews should appear within 1–2 minutes

Test order revenue

  1. Place a test order on your store
  2. Wait 2–3 minutes for the hourly sync (or click "Sync now" in the integration panel)
  3. Check the Ecommerce dashboard for revenue and order data

Troubleshooting

❓ Pageviews not appearing

Check that your domain in SimpleData matches your Shopify domain exactly. Try visiting in an incognito window and clearing cache.

❓ Access token error on connect

Make sure you copied the token immediately after installation. If you missed it, re-install the app to generate a new one.

❓ Orders not syncing

Ensure the app has read_orders permission. Click "Sync now" in the panel or wait for the next hourly sync.

❓ Script Tag not installed

Make sure the app has write_script_tags permission. Disconnect and reconnect to retry the installation.

Need Help?

Next Steps