Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

UI implementation of the AI forecast for panel tabs

Blue Mouse30ad92402148
diff --git a/app/api/index.ts b/app/api/index.ts
index c2a533dd7..2d0278cd1 100644
--- a/app/api/index.ts
+++ b/app/api/index.ts
@@ -19,6 +19,7 @@ import { IAlerts } from 'redux/models/IAlerts'
import { ISharedProject } from 'redux/models/ISharedProject'
import { ISubscribers } from 'redux/models/ISubscribers'
import { IFilter, IProjectViewCustomEvent } from 'pages/Project/View/interfaces/traffic'
+import { AIResponse } from 'pages/Project/View/interfaces/ai'
const debug = Debug('swetrix:api')
@@ -1429,3 +1430,16 @@ export const updateErrorStatus = (pid: string, status: 'resolved' | 'active', ei
debug('%s', error)
throw _isEmpty(error.response.data?.message) ? error.response.data : error.response.data.message
})
+
+export const getDetailsPrediction = (pid: string, password: string | undefined = ''): Promise<AIResponse> =>
+ api
+ .get(`project/${pid}/predict`, {
+ headers: {
+ 'x-password': password,
+ },
+ })
+ .then((response) => response.data)
+ .catch((error) => {
+ debug('%s', error)
+ throw _isEmpty(error.response.data?.message) ? error.response.data : error.response.data.message
+ })
diff --git a/app/modals/Forecast.tsx b/app/modals/Forecast.tsx
index 6aacb84c3..8953160aa 100644
--- a/app/modals/Forecast.tsx
+++ b/app/modals/Forecast.tsx
@@ -1,17 +1,25 @@
-import React, { useState } from 'react'
+import React, { useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import _isNaN from 'lodash/isNaN'
+import _map from 'lodash/map'
+import cx from 'clsx'
import Modal from 'ui/Modal'
import Input from 'ui/Input'
import { FORECAST_MAX_MAPPING } from 'redux/constants'
import _toString from 'lodash/toString'
+import { Bars3BottomRightIcon, ChartBarIcon } from '@heroicons/react/24/outline'
const DEFAULT_PERIOD = '3'
interface IForecast {
onClose: () => void
- onSubmit: (period: string) => void
+ onSubmit: (
+ type: 'chart' | 'details',
+ options?: {
+ period: string
+ },
+ ) => void
isOpened: boolean
activeTB: string
tb: string
@@ -21,6 +29,22 @@ const Forecast = ({ onClose, onSubmit, isOpened, activeTB, tb }: IForecast): JSX
const { t } = useTranslation('common')
const [period, setPeriod] = useState<string>(DEFAULT_PERIOD)
const [error, setError] = useState<string | null>(null)
+ const [activeTab, setActiveTab] = useState<'chart' | 'details'>('chart')
+
+ const tabs = useMemo(() => {
+ return [
+ {
+ id: 'chart' as const,
+ label: t('modals.forecast.chart'),
+ icon: ChartBarIcon,
+ },
+ {
+ id: 'details' as const,
+ label: t('modals.forecast.details'),
+ icon: Bars3BottomRightIcon,
+ },
+ ]
+ }, [t])
const handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {
const { value } = e.target
@@ -30,6 +54,10 @@ const Forecast = ({ onClose, onSubmit, isOpened, activeTB, tb }: IForecast): JSX
}
const _onSubmit = () => {
+ if (activeTab === 'details') {
+ return onSubmit(activeTab)
+ }
+
const processedPeriod = Number(period)
if (_isNaN(processedPeriod)) {
@@ -51,7 +79,9 @@ const Forecast = ({ onClose, onSubmit, isOpened, activeTB, tb }: IForecast): JSX
return
}
- onSubmit(_toString(processedPeriod))
+ onSubmit(activeTab, {
+ period: _toString(processedPeriod),
+ })
}
const _onClose = () => {
@@ -68,19 +98,60 @@ const Forecast = ({ onClose, onSubmit, isOpened, activeTB, tb }: IForecast): JSX
closeText={t('common.cancel')}
message={
<div>
- {t('modals.forecast.desc')}
+ <div className='mb-4 flex space-x-4 overflow-x-auto' aria-label='Forecast type selector'>
+ {_map(tabs, (tab) => {
+ const isCurrent = tab.id === activeTab
- <Input
- name='forecast-input'
- label={t('modals.forecast.input', {
- frequency: activeTB,
+ return (
+ <div
+ key={tab.id}
+ onClick={() => {
+ setActiveTab(tab.id)
+ }}
+ className={cx(
+ 'text-md group inline-flex cursor-pointer items-center whitespace-nowrap border-b-2 px-1 py-2 font-bold',
+ {
+ 'border-slate-900 text-slate-900 dark:border-gray-50 dark:text-gray-50': isCurrent,
+ 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:border-gray-300 dark:hover:text-gray-300':
+ !isCurrent,
+ },
+ )}
+ aria-current={isCurrent ? 'page' : undefined}
+ >
+ <tab.icon
+ className={cx(
+ isCurrent
+ ? 'text-slate-900 dark:text-gray-50'
+ : 'text-gray-500 group-hover:text-gray-500 dark:text-gray-400 dark:group-hover:text-gray-300',
+ '-ml-0.5 mr-2 h-5 w-5',
+ )}
+ aria-hidden='true'
+ />
+ <span>{tab.label}</span>
+ </div>
+ )
})}
- value={period}
- placeholder={DEFAULT_PERIOD}
- className='mt-4'
- onChange={handleInput}
- error={error}
- />
+ </div>
+
+ {activeTab === 'chart' && (
+ <>
+ {t('modals.forecast.desc')}
+
+ <Input
+ name='forecast-input'
+ label={t('modals.forecast.input', {
+ frequency: activeTB,
+ })}
+ value={period}
+ placeholder={DEFAULT_PERIOD}
+ className='mt-4'
+ onChange={handleInput}
+ error={error}
+ />
+ </>
+ )}
+
+ {activeTab === 'details' && t('modals.forecast.detailsDesc')}
</div>
}
title={t('modals.forecast.title')}
diff --git a/app/pages/Project/View/ViewProject.tsx b/app/pages/Project/View/ViewProject.tsx
index e358ccef8..18f60b8a8 100644
--- a/app/pages/Project/View/ViewProject.tsx
+++ b/app/pages/Project/View/ViewProject.tsx
@@ -28,6 +28,8 @@ import { useTranslation } from 'react-i18next'
import { useHotkeys } from 'react-hotkeys-hook'
import _keys from 'lodash/keys'
import _map from 'lodash/map'
+import _reduce from 'lodash/reduce'
+import _split from 'lodash/split'
import _includes from 'lodash/includes'
import _last from 'lodash/last'
import _isEmpty from 'lodash/isEmpty'
@@ -143,6 +145,7 @@ import {
getPropertyMetadata,
getProjectViews,
deleteProjectView,
+ getDetailsPrediction,
} from 'api'
import { getChartPrediction } from 'api/ai'
import { Panel, Metadata } from './Panels'
@@ -211,6 +214,7 @@ import {
import { trackCustom } from 'utils/analytics'
import AddAViewModal from './components/AddAViewModal'
import CustomMetrics from './components/CustomMetrics'
+import { AIProcessedResponse, AIResponse } from './interfaces/ai'
const SwetrixSDK = require('@swetrix/sdk')
const CUSTOM_EV_DROPDOWN_MAX_VISIBLE_LENGTH = 32
@@ -492,6 +496,38 @@ const ViewProject = ({
const [projectViewDeleting, setProjectViewDeleting] = useState(false)
const [projectViewToUpdate, setProjectViewToUpdate] = useState<IProjectView | undefined>()
+ // AI stuff
+ const [forecasedChartData, setForecasedChartData] = useState({})
+ const [isInAIDetailsMode, setIsInAIDetailsMode] = useState(false)
+ const [aiDetails, setAiDetails] = useState<AIProcessedResponse | null>(null)
+ const [activeAiDetail, setActiveAIDetail] = useState<keyof AIResponse | null>(null)
+
+ const sortedAIKeys = useMemo(() => {
+ if (!aiDetails) {
+ return []
+ }
+
+ const hours = _map(aiDetails, (_, key) => parseInt(_split(key, '_')[1], 10)).sort((a, b) => a - b)
+
+ return _map(hours, (hour) => {
+ const key = `next_${hour}_hour` as keyof AIResponse
+
+ if (hour === 1) {
+ return {
+ key,
+ label: t('project.nextOneHour'),
+ }
+ }
+
+ return {
+ key,
+ label: t('project.nextXHours', {
+ x: hour,
+ }),
+ }
+ })
+ }, [aiDetails, t])
+
const mode = activeChartMetrics[CHART_METRICS_MAPPING.cumulativeMode] ? 'cumulative' : 'periodical'
const loadProjectViews = async (forced?: boolean) => {
@@ -619,11 +655,6 @@ const ViewProject = ({
// pgActiveFragment is a active fragment for pagination
const [pgActiveFragment, setPgActiveFragment] = useState<number>(0)
- // TODO: THIS SHOULD BE MOVED TO REDUCERS WITH CACHE FUNCTIONALITY
- // I PUT IT HERE JUST TO SEE IF IT WORKS WELL
- // forecastData is a data for forecast chart
- const [forecasedChartData, setForecasedChartData] = useState<any>({})
-
// Used to switch between Country, Region and City tabs
const [countryActiveTab, setCountryActiveTab] = useState<'cc' | 'rg' | 'ct'>('cc')
@@ -2564,14 +2595,7 @@ const ViewProject = ({
setIsForecastOpened(true)
}
- // onForecastSubmit is a function for submit forecast modal
- const onForecastSubmit = async (periodToForecast: string) => {
- if (isSelfhosted) {
- return
- }
-
- setIsForecastOpened(false)
- setDataLoading(true)
+ const forecastChart = async (periodToForecast: string) => {
const key = getProjectForcastCacheKey(period, timeBucket, periodToForecast, filters)
const data = cache[id][key]
@@ -2582,16 +2606,78 @@ const ViewProject = ({
}
try {
- trackCustom('TRAFFIC_FORECAST')
const result = await getChartPrediction(chartData, periodToForecast, timeBucket)
const transformed = transformAIChartData(result)
setProjectForcastCache(id, transformed, key)
setForecasedChartData(transformed)
- } catch (e) {
- console.error(`[onForecastSubmit] Error: ${e}`)
+ } catch (reason) {
+ console.error(`[forecastChart] Error: ${reason}`)
+ }
+ }
+
+ const forecastDetails = async () => {
+ try {
+ const data = await getDetailsPrediction(project.id, projectPassword)
+
+ if (_isEmpty(data)) {
+ throw new Error('getDetailsPrediction returned an empty object')
+ }
+
+ const result: AIProcessedResponse = {}
+
+ const dataKeys = _keys(data) as (keyof AIResponse)[]
+
+ for (let i = 0; i < dataKeys.length; ++i) {
+ const dataKey = dataKeys[i]
+
+ const processed = _reduce(
+ data[dataKey],
+ (prev, curr, key) => {
+ return {
+ ...prev,
+ [key]: _map(_keys(curr), (key) => ({
+ name: key,
+ count: curr?.[key] || 0,
+ })),
+ }
+ },
+ {},
+ )
+
+ result[dataKey] = processed
+ }
+
+ setAiDetails(result)
+ setActiveAIDetail(_keys(data)[0] as keyof AIResponse)
+ setIsInAIDetailsMode(true)
+ } catch (reason) {
+ console.error(`[forecastDetails] Error: ${reason}`)
+ showError(t('apiNotifications.noAIForecastAvailable'))
+ }
+ }
+
+ const onForecastSubmit = async (type: 'chart' | 'details', options: any = {}) => {
+ if (isSelfhosted) {
+ return
+ }
+
+ setIsForecastOpened(false)
+ setDataLoading(true)
+
+ if (type === 'chart') {
+ const { period: periodToForecast } = options
+ await forecastChart(periodToForecast)
+ }
+
+ if (type === 'details') {
+ await forecastDetails()
}
setDataLoading(false)
+
+ trackCustom('TRAFFIC_FORECAST', {
+ type,
+ })
}
useEffect(() => {
@@ -3543,52 +3629,78 @@ const ViewProject = ({
/>
</div>
<div className='hidden sm:block'>
- <div>
- <nav className='-mb-px flex space-x-4 overflow-x-auto' aria-label='Tabs'>
- {_map(tabs, (tab) => {
- const isCurrent = tab.id === activeTab
- const isSettings = tab.id === 'settings'
-
- const onClick = isSettings
- ? openSettingsHandler
- : () => {
- setProjectTab(tab.id)
- setActiveTab(tab.id)
- }
+ <nav className='-mb-px flex space-x-4 overflow-x-auto' aria-label='Tabs'>
+ {_map(tabs, (tab) => {
+ const isCurrent = tab.id === activeTab
+ const isSettings = tab.id === 'settings'
+
+ const onClick = isSettings
+ ? openSettingsHandler
+ : () => {
+ setProjectTab(tab.id)
+ setActiveTab(tab.id)
+ }
- return (
- <div
- key={tab.id}
- onClick={onClick}
+ return (
+ <div
+ key={tab.id}
+ onClick={onClick}
+ className={cx(
+ 'text-md group inline-flex cursor-pointer items-center whitespace-nowrap border-b-2 px-1 py-2 font-bold',
+ {
+ 'border-slate-900 text-slate-900 dark:border-gray-50 dark:text-gray-50': isCurrent,
+ 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:border-gray-300 dark:hover:text-gray-300':
+ !isCurrent,
+ },
+ )}
+ aria-current={isCurrent ? 'page' : undefined}
+ >
+ <tab.icon
className={cx(
- 'text-md group inline-flex cursor-pointer items-center whitespace-nowrap border-b-2 px-1 py-2 font-bold',
- {
- 'border-slate-900 text-slate-900 dark:border-gray-50 dark:text-gray-50': isCurrent,
- 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:border-gray-300 dark:hover:text-gray-300':
- !isCurrent,
- },
+ isCurrent
+ ? 'text-slate-900 dark:text-gray-50'
+ : 'text-gray-500 group-hover:text-gray-500 dark:text-gray-400 dark:group-hover:text-gray-300',
+ '-ml-0.5 mr-2 h-5 w-5',
)}
- aria-current={isCurrent ? 'page' : undefined}
- >
- <tab.icon
- className={cx(
- isCurrent
- ? 'text-slate-900 dark:text-gray-50'
- : 'text-gray-500 group-hover:text-gray-500 dark:text-gray-400 dark:group-hover:text-gray-300',
- '-ml-0.5 mr-2 h-5 w-5',
- )}
- aria-hidden='true'
- />
- <span>{tab.label}</span>
- </div>
- )
- })}
- </nav>
- </div>
+ aria-hidden='true'
+ />
+ <span>{tab.label}</span>
+ </div>
+ )
+ })}
+ </nav>
</div>
</div>
)
+ const AITabsSelector = () => (
+ <div className='-mb-px flex space-x-4 overflow-x-auto' aria-label='Tabs'>
+ {_map(sortedAIKeys, ({ key, label }) => {
+ const isCurrent = activeAiDetail === key
+
+ return (
+ <div
+ key={key}
+ onClick={() => {
+ setActiveAIDetail(key)
+ }}
+ className={cx(
+ 'text-md group inline-flex cursor-pointer items-center whitespace-nowrap border-b-2 px-1 py-2 font-bold',
+ {
+ 'border-slate-900 text-slate-900 dark:border-gray-50 dark:text-gray-50': isCurrent,
+ 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:border-gray-300 dark:hover:text-gray-300':
+ !isCurrent,
+ },
+ )}
+ aria-current={isCurrent}
+ >
+ <span>{label}</span>
+ </div>
+ )
+ })}
+ </div>
+ )
+
if (isLoading) {
return (
<>
@@ -3692,9 +3804,27 @@ const ViewProject = ({
})}
ref={dashboardRef}
>
- {/* Tabs selector */}
- <TabsSelector />
- {activeTab !== PROJECT_TABS.alerts &&
+ {isInAIDetailsMode ? (
+ <>
+ <button
+ onClick={() => {
+ setIsInAIDetailsMode(false)
+ setAiDetails(null)
+ setActiveAIDetail(null)
+ }}
+ className='mx-auto mb-4 mt-2 flex items-center text-base font-normal text-gray-900 underline decoration-dashed hover:decoration-solid dark:text-gray-100 lg:mx-0 lg:mt-0'
+ >
+ <ChevronLeftIcon className='h-4 w-4' />
+ {t('project.exitForecastingMode')}
+ </button>
+ <AITabsSelector />
+ <span className='mt-6 text-sm'>{t('project.aiDetailsDesc')}</span>
+ </>
+ ) : (
+ <TabsSelector />
+ )}
+ {!isInAIDetailsMode &&
+ activeTab !== PROJECT_TABS.alerts &&
(activeTab !== PROJECT_TABS.sessions || !activePSID) &&
(activeFunnel || activeTab !== PROJECT_TABS.funnels) && (
<>
@@ -4687,7 +4817,7 @@ const ViewProject = ({
)}
{activeTab === PROJECT_TABS.traffic && (
<div className={cx('pt-2', { hidden: isPanelsDataEmpty || analyticsLoading })}>
- {!_isEmpty(overall) && (
+ {!isInAIDetailsMode && !_isEmpty(overall) && (
<div className='mb-5 flex flex-wrap justify-center gap-5 lg:justify-start'>
<MetricCards
overall={overall}
@@ -4721,23 +4851,27 @@ const ViewProject = ({
)}
<div
className={cx('h-80', {
- hidden: checkIfAllMetricsAreDisabled,
+ hidden: checkIfAllMetricsAreDisabled || isInAIDetailsMode,
})}
>
<div className='mt-5 h-80 md:mt-0 [&_svg]:!overflow-visible' id='dataChart' />
</div>
- <Filters
- filters={filters}
- onRemoveFilter={filterHandler}
- onChangeExclusive={onChangeExclusive}
- tnMapping={tnMapping}
- resetFilters={resetActiveTabFilters}
- />
- <CustomMetrics
- metrics={customMetrics}
- onRemoveMetric={(id) => onRemoveCustomMetric(id)}
- resetMetrics={resetCustomMetrics}
- />
+ {!isInAIDetailsMode && (
+ <>
+ <Filters
+ filters={filters}
+ onRemoveFilter={filterHandler}
+ onChangeExclusive={onChangeExclusive}
+ tnMapping={tnMapping}
+ resetFilters={resetActiveTabFilters}
+ />
+ <CustomMetrics
+ metrics={customMetrics}
+ onRemoveMetric={(id) => onRemoveCustomMetric(id)}
+ resetMetrics={resetCustomMetrics}
+ />
+ </>
+ )}
{dataLoading && (
<div className='static mt-4 !bg-transparent' id='loader'>
<div className='loader-head dark:!bg-slate-800'>
@@ -4754,6 +4888,8 @@ const ViewProject = ({
const panelIcon = panelIconMapping[type]
const customTabs = _filter(customPanelTabs, (tab) => tab.panelID === type)
+ const dataSource = isInAIDetailsMode ? aiDetails?.[activeAiDetail!] || {} : panelsData.data
+
if (type === 'cc') {
const ccPanelName = tnMapping[countryActiveTab]
@@ -4776,7 +4912,7 @@ const ViewProject = ({
onFilter={filterHandler}
activeTab={activeTab}
name={<CountryDropdown onSelect={setCountryActiveTab} title={ccPanelName} />}
- data={panelsData.data[countryActiveTab]}
+ data={dataSource[countryActiveTab]}
customTabs={customTabs}
rowMapper={rowMapper}
/>
@@ -4817,7 +4953,7 @@ const ViewProject = ({
activeTab={activeTab}
onFilter={filterHandler}
name={panelName}
- data={panelsData.data[type]}
+ data={dataSource[type]}
customTabs={customTabs}
rowMapper={rowMapper}
/>
@@ -4865,7 +5001,7 @@ const ViewProject = ({
activeTab={activeTab}
onFilter={filterHandler}
name={panelName}
- data={panelsData.data[type]}
+ data={dataSource[type]}
customTabs={customTabs}
rowMapper={rowMapper}
/>
@@ -4882,7 +5018,7 @@ const ViewProject = ({
id={type}
onFilter={filterHandler}
name={panelName}
- data={panelsData.data[type]}
+ data={dataSource[type]}
customTabs={customTabs}
capitalize
/>
@@ -4899,7 +5035,7 @@ const ViewProject = ({
onFilter={filterHandler}
name={panelName}
activeTab={activeTab}
- data={panelsData.data[type]}
+ data={dataSource[type]}
customTabs={customTabs}
// @ts-ignore
rowMapper={({ name: entryName }) => <RefRow rowName={entryName} />}
@@ -4919,7 +5055,7 @@ const ViewProject = ({
activeTab={activeTab}
onFilter={filterHandler}
name={<UTMDropdown onSelect={setUtmActiveTab} title={ccPanelName} />}
- data={panelsData.data[utmActiveTab]}
+ data={dataSource[utmActiveTab]}
customTabs={customTabs}
// @ts-ignore
rowMapper={({ name: entryName }) => decodeURIComponent(entryName)}
@@ -4953,7 +5089,7 @@ const ViewProject = ({
return decodedUri
}}
name={pgPanelNameMapping[pgActiveFragment]}
- data={panelsData.data[type]}
+ data={dataSource[type]}
customTabs={customTabs}
period={period}
activeTab={activeTab}
@@ -4977,7 +5113,7 @@ const ViewProject = ({
activeTab={activeTab}
onFilter={filterHandler}
name={panelName}
- data={panelsData.data[type]}
+ data={dataSource[type]}
rowMapper={({ name: entryName }: { name: string }) =>
getLocaleDisplayName(entryName, language)
}
@@ -4995,12 +5131,12 @@ const ViewProject = ({
activeTab={activeTab}
onFilter={filterHandler}
name={panelName}
- data={panelsData.data[type]}
+ data={dataSource[type]}
customTabs={customTabs}
/>
)
})}
- {!_isEmpty(panelsData.data) && (
+ {!isInAIDetailsMode && !_isEmpty(panelsData.data) && (
<Metadata
customs={panelsData.customs}
properties={panelsData.properties}
diff --git a/app/pages/Project/View/interfaces/ai.tsx b/app/pages/Project/View/interfaces/ai.tsx
new file mode 100644
index 000000000..0864b2938
--- /dev/null
+++ b/app/pages/Project/View/interfaces/ai.tsx
@@ -0,0 +1,34 @@
+import { IParams } from './traffic'
+
+interface AIProperty {
+ [key: string]: number
+}
+
+interface AIResponseObject {
+ dv?: AIProperty
+ br?: AIProperty
+ os?: AIProperty
+ lc?: AIProperty
+ cc?: AIProperty
+ unique?: AIProperty
+}
+
+export interface AIResponse {
+ next_1_hour?: AIResponseObject
+ next_4_hour?: AIResponseObject
+ next_8_hour?: AIResponseObject
+ next_12_hour?: AIResponseObject
+ next_24_hour?: AIResponseObject
+ next_72_hour?: AIResponseObject
+ next_168_hour?: AIResponseObject
+}
+
+export interface AIProcessedResponse {
+ next_1_hour?: IParams
+ next_4_hour?: IParams
+ next_8_hour?: IParams
+ next_12_hour?: IParams
+ next_24_hour?: IParams
+ next_72_hour?: IParams
+ next_168_hour?: IParams
+}
diff --git a/public/locales/en.json b/public/locales/en.json
index b99dae4d8..8f1949bd0 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -45,7 +45,8 @@
"errorStatusUpdated": "Error status has been updated",
"enterViewName": "Please enter a view name",
"inputCannotBeEmpty": "This input field must not be empty",
- "viewDeleted": "View has been deleted"
+ "viewDeleted": "View has been deleted",
+ "noAIForecastAvailable": "AI forecast is not available for this project yet"
},
"common": {
"features": "Features",
@@ -780,6 +781,10 @@
},
"project": {
"metadata": "Metadata",
+ "nextOneHour": "Next 1 hour",
+ "nextXHours": "Next {{x}} hours",
+ "exitForecastingMode": "Exit forecasting mode",
+ "aiDetailsDesc": "The buttons above allow you to see an estimate of what kind of traffic you can expect in the next X hours.",
"search": "Search",
"views": "Views",
"viewName": "View name",
@@ -1092,8 +1097,11 @@
},
"forecast": {
"title": "Traffic forecast",
- "desc": "This is a rough estimate of how much traffic you can expect to get on your website, based on Swetrix AI models.",
- "input": "The quantity of '{{frequency}}' you want to forecast"
+ "desc": "This type of forecast gives you a rough estimate on the main graph of how much traffic you can expect to get to your website.",
+ "detailsDesc": "This type of forecast provides you with a more flexible prediction, showing you what type of users (from what country, browser, locale, etc.) and how many of them you can expect to visit within your chosen timeframe.\n\nIt may not be available for newly created or low traffic sites, as we train our prediction models regularly and such sites may not be included in the training dataset.\n\nIf you wish to continue with this type of forecast, please press 'Continue'.",
+ "input": "The quantity of '{{frequency}}' you want to forecast",
+ "chart": "Chart forecast",
+ "details": "Details forecast"
},
"funnels": {
"addTitle": "Add funnel",