refactor: update references from Ciphera Analytics to Ciphera Pulse across the application for consistent branding and messaging
This commit is contained in:
@@ -25,6 +25,14 @@ export interface PerformanceStats {
|
||||
inp: number
|
||||
}
|
||||
|
||||
export interface PerformanceByPageStat {
|
||||
path: string
|
||||
samples: number
|
||||
lcp: number | null
|
||||
cls: number | null
|
||||
inp: number | null
|
||||
}
|
||||
|
||||
export interface TopReferrer {
|
||||
referrer: string
|
||||
pageviews: number
|
||||
@@ -180,6 +188,23 @@ export async function getScreenResolutions(siteId: string, startDate?: string, e
|
||||
return apiRequest<{ screen_resolutions: ScreenResolutionStat[] }>(`/sites/${siteId}/screen-resolutions?${params.toString()}`).then(r => r?.screen_resolutions || [])
|
||||
}
|
||||
|
||||
export async function getPerformanceByPage(
|
||||
siteId: string,
|
||||
startDate?: string,
|
||||
endDate?: string,
|
||||
opts?: { limit?: number; sort?: 'lcp' | 'cls' | 'inp' }
|
||||
): Promise<PerformanceByPageStat[]> {
|
||||
const params = new URLSearchParams()
|
||||
if (startDate) params.append('start_date', startDate)
|
||||
if (endDate) params.append('end_date', endDate)
|
||||
if (opts?.limit != null) params.append('limit', String(opts.limit))
|
||||
if (opts?.sort) params.append('sort', opts.sort)
|
||||
const res = await apiRequest<{ performance_by_page: PerformanceByPageStat[] }>(
|
||||
`/sites/${siteId}/performance-by-page?${params.toString()}`
|
||||
)
|
||||
return res?.performance_by_page ?? []
|
||||
}
|
||||
|
||||
export interface DashboardData {
|
||||
site: Site
|
||||
stats: Stats
|
||||
@@ -197,6 +222,7 @@ export interface DashboardData {
|
||||
devices: DeviceStat[]
|
||||
screen_resolutions: ScreenResolutionStat[]
|
||||
performance?: PerformanceStats
|
||||
performance_by_page?: PerformanceByPageStat[]
|
||||
}
|
||||
|
||||
export async function getDashboard(siteId: string, startDate?: string, endDate?: string, limit = 10, interval?: string): Promise<DashboardData> {
|
||||
|
||||
@@ -99,7 +99,7 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
|
||||
|
||||
return (
|
||||
<AuthContext.Provider value={{ user, loading, login, logout, refresh, refreshSession }}>
|
||||
{isLoggingOut && <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Ciphera Analytics" />}
|
||||
{isLoggingOut && <LoadingOverlay logoSrc="/ciphera_icon_no_margins.png" title="Ciphera Pulse" />}
|
||||
{children}
|
||||
</AuthContext.Provider>
|
||||
)
|
||||
|
||||
@@ -3,10 +3,10 @@ import type { Site } from '@/lib/api/sites'
|
||||
const DOCS_URL =
|
||||
(typeof process !== 'undefined' && process.env?.NEXT_PUBLIC_APP_URL)
|
||||
? `${process.env.NEXT_PUBLIC_APP_URL}/faq`
|
||||
: 'https://analytics.ciphera.net/faq'
|
||||
: 'https://pulse.ciphera.net/faq'
|
||||
|
||||
/**
|
||||
* Generates a privacy-policy snippet for the site's use of Ciphera Analytics.
|
||||
* Generates a privacy-policy snippet for the site's use of Ciphera Pulse.
|
||||
* The text is derived from the site's data collection and filtering settings
|
||||
* and is intended to be copied into the site owner's Privacy Policy page.
|
||||
* This is for transparency (GDPR Art. 13/14); it is not a cookie banner.
|
||||
@@ -40,13 +40,13 @@ export function generatePrivacySnippet(site: Site): string {
|
||||
: 'minimal anonymous data about site usage (e.g. that a page was viewed)'
|
||||
|
||||
const p1 =
|
||||
'We use Ciphera Analytics to understand how visitors use our site. Ciphera does not use cookies or other persistent identifiers. A cookie consent banner is not required for Ciphera Analytics. We respect Do Not Track (DNT) browser settings.'
|
||||
'We use Ciphera Pulse to understand how visitors use our site. Ciphera does not use cookies or other persistent identifiers. A cookie consent banner is not required for Ciphera Pulse. We respect Do Not Track (DNT) browser settings.'
|
||||
|
||||
let p2 = `We collect anonymous data: ${list}. `
|
||||
if (filterBots) {
|
||||
p2 += 'Known bots and referrer spam are excluded from our analytics. '
|
||||
}
|
||||
p2 += `Data is processed in a privacy-preserving way and is not used to identify individuals. For more information, see Ciphera Analytics' documentation: ${DOCS_URL}`
|
||||
p2 += `Data is processed in a privacy-preserving way and is not used to identify individuals. For more information, see Ciphera Pulse' documentation: ${DOCS_URL}`
|
||||
|
||||
return `${p1}\n\n${p2}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user