Created
October 12, 2022 08:59
-
-
Save ivanbuzyka/b21668a4ade674d60f2b657ae9643810 to your computer and use it in GitHub Desktop.
SQL queries to investigate Sitecore EXM issues
This file contains 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
SELECT TargetPageUrl, ContactId FROM [xdb_collection].[Interactions] | |
CROSS APPLY | |
OPENJSON([xdb_collection].[Interactions].[Events]) WITH | |
( | |
OdataType varchar(200) '$."@odata.type"', | |
MessageId varchar(200) '$.MessageId', | |
TargetPageUrl varchar(200) '$.Url' | |
) | |
WHERE | |
OdataType = '#Sitecore.EmailCampaign.Model.XConnect.Events.EmailClickedEvent' | |
AND | |
MessageId = '<MessageId>' -- insert message id here | |
GROUP by TargetPageUrl, ContactId | |
ORDER by TargetpageUrl | |
GO |
This file contains 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
SELECT * FROM [xdb_collection].[Interactions] | |
CROSS APPLY | |
OPENJSON([xdb_collection].[Interactions].[Events]) WITH | |
( | |
OdataType varchar(200) '$."@odata.type"', | |
MessageId varchar(200) '$.MessageId' | |
) | |
WHERE | |
OdataType = '#Sitecore.EmailCampaign.Model.XConnect.Events.DispatchFailedEvent' -- please insert the type of event | |
AND | |
MessageId = '<MessageId>' -- insert message here |
This file contains 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
#Sitecore.EmailCampaign.Model.XConnect.Events.EmailClickedEvent | |
#Sitecore.EmailCampaign.Model.XConnect.Events.EmailOpenedEvent | |
#Sitecore.EmailCampaign.Model.XConnect.Events.EmailSentEvent | |
#Sitecore.EmailCampaign.Model.XConnect.Events.UnsubscribedFromEmailEvent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment