This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () | |
function getLastEvent(sessions) { | |
var lastSession = sessions[sessions.length - 1]; | |
var lastEvent = lastSession.events[lastSession.events.length - 1]; | |
return lastEvent; | |
} | |
var lastEvent = getLastEvent(guest.sessions); | |
return lastEvent.type; | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () | |
var sessionRef; | |
if (entity) { | |
sessionRef = entity.ref; | |
} | |
var sessionStatus = ""; | |
for (var i = 0; i < guest.sessions.length; i++) { | |
var session = guest.sessions[i]; | |
if (session.ref === sessionRef) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
function getNumberOfEvents(sessions, eventType) { | |
var numberOfEvents = 0; | |
for (var i = 0; i < sessions.length; i++) { | |
var session = sessions[i]; | |
for (var j = 0; j < session.events.length; j++) { | |
var event = session.events[j]; | |
if (event.type === eventType) { | |
numberOfEvents++; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [database_name] -- replace with your Reporting DB name | |
GO | |
-- [Fact_MvTesting] contains aggregated number of visits, engagement value, bounces, etc. for each test variant | |
-- TestSetId is ID of test definition item and TestValues represent each of the test variants | |
SELECT * | |
FROM [dbo].[Fact_MvTesting] | |
WHERE TestSetId = 'DB071F98-C2CE-4DBB-8873-2E378F88CEB4' -- replace with your test ID | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [database_name] -- replace with your Shard DB name, you may need to check all your Shard DBs | |
GO | |
SELECT * | |
FROM [xdb_collection].[ContactFacets] | |
WHERE ContactId = '0E3CC254-C440-0000-0000-062C9FE15922' -- replace with your contact ID | |
AND FacetKey = 'TestCombinations' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [database_name] -- replace with your Shard DB name, you may need to check all your Shard DBs | |
GO | |
SELECT TOP(100) * --always limit number of results, especially if you Shard DB is large | |
FROM [xdb_collection].[Interactions] | |
WHERE ContactId = '0E3CC254-C440-0000-0000-062C9FE15922' -- replace with your contact ID if it is known | |
AND StartDateTime > '2022-01-01 12:00' -- replace with your date and time, keep the time range as small as possible | |
-- be careful when adding more fields to the WHERE condition because Interactions table has only 2 indexes and searching for large number of interactions can be slow |