From 482d2a0cd9254a09c1c4428c8ac36b32401618f4 Mon Sep 17 00:00:00 2001 From: oybek Date: Mon, 1 Apr 2024 20:12:02 +0400 Subject: [PATCH] feat(readme): updated readme --- .env.example | 1 + README.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.env.example b/.env.example index 9ff0463db..ef0c3344a 100644 --- a/.env.example +++ b/.env.example @@ -5,3 +5,4 @@ SITE_NAME="Next.js Commerce" SHOPIFY_REVALIDATION_SECRET="" SHOPIFY_STOREFRONT_ACCESS_TOKEN="" SHOPIFY_STORE_DOMAIN="[your-shopify-store-subdomain].myshopify.com" +NEXT_PUBLIC_SHOPIFY_SHOP_ID="[your-shopify-shop-id]" diff --git a/README.md b/README.md index c2802b8b2..ad2884188 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ A Next.js 14 and App Router-ready ecommerce template featuring: - Styling with Tailwind CSS - Checkout and payments with Shopify - Automatic light/dark mode based on system settings +- Shopify Analytics

@@ -51,6 +52,21 @@ Integrations enable upgraded or additional functionality for Next.js Commerce configuration. - Search runs entirely in the browser for smaller catalogs or on a CDN for larger. +## Shopify analytics + +1. Visit https://[your-store-id].myshopify.com/shop.json +2. Search for `shopId` and add it to the `NEXT_PUBLIC_SHOPIFY_SHOP_ID` in your `.env` file. + +To test out Shopify analytics, in your localhost, you can use the following steps: + +1. Install ngrok +2. Setup custom domain in ngrok dashboard +3. Expose your local development server (e.g., running on port 3000) with a command: + +```bash +ngrok http --domain=YOUR_NGROK_DOMAIN 3000 +``` + ## Running locally You will need to use the environment variables [defined in `.env.example`](.env.example) to run Next.js Commerce. It's