Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.analytics.live();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->analytics->live();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.analytics.live()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/analytics/live \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/analytics/live"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/analytics/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/analytics/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"windowMinutes": 10,
"currencyCode": "USD",
"home": {
"countryCode": "DE",
"country": "Germany",
"latitude": 51.13,
"longitude": 10.29
},
"now": {
"visitors": 0,
"carted": 0,
"checkingOut": 0,
"purchased": 0
},
"today": {
"sessions": 0,
"views": 0,
"orders": 3,
"revenue": 29.98,
"from": "2026-10-22",
"timezone": "UTC"
},
"visitors": [],
"orders": [],
"topPages": [],
"topLocations": []
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Analytics
Get the live view
What is happening on the store now: who is on it and where, the checkouts and orders of the last ten minutes, and the day’s running totals.
Needs the analytics.read permission (Read Analytics).
GET
/
stores
/
{storeId}
/
analytics
/
live
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.analytics.live();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->analytics->live();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.analytics.live()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/analytics/live \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/analytics/live"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/analytics/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/analytics/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"windowMinutes": 10,
"currencyCode": "USD",
"home": {
"countryCode": "DE",
"country": "Germany",
"latitude": 51.13,
"longitude": 10.29
},
"now": {
"visitors": 0,
"carted": 0,
"checkingOut": 0,
"purchased": 0
},
"today": {
"sessions": 0,
"views": 0,
"orders": 3,
"revenue": 29.98,
"from": "2026-10-22",
"timezone": "UTC"
},
"visitors": [],
"orders": [],
"topPages": [],
"topLocations": []
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
Query Parameters
The time zone "today" is in, as an IANA name. Left out, UTC.

