Home Gitesh Portfolio Blog About Me Gallery Contact

Sitecore: Get visits, views and contacts from SQL

By running this SQL query you will be able to get the vistis, page views and contacts from XDB database.

 
Select 
SUM([Views]) as [TotalViews],
Sum([Visits]) as [TotalVisits],
Sum([Value]) as [TotalValue],
Count(DISTINCT [ContactId]) as [TotalVisitors]
From [Fact_PageViews] 
WHERE
   [ItemId] = '00000000-0000-0000-0000-000000000000'
   AND [Date] BETWEEN '2018-09-26 00:00:00' AND '2018-09-27 00:00:00'
Posted: 17/05/2022 2:40:37 p.m. by Gitesh Shah | with 0 comments