When I was using MongoDB on Sitecore 8.1, Page Events were stored in the Interactions collection; I could query them this way:

`db.getCollection('Interactions').find({ "Pages.PageEvents" : { $size: 1 } }).sort({StartDateTime: -1})`

I am creating Page Events and they are indeed being aggregated in the Reporting Database the next day; but despite my best efforts, I could not find where they are being stored.


Where are Custom Page Events stored before Aggregation in an XP Scaled Sitecore 9.1 solution?

  • Did you look in your shard(n) databases? Assuming you have shard0 and shard1 databases- look in the [Interactions] tables for either database.
    – jrap
    Jun 26, 2019 at 15:42
  • The Events column should have what you're after. Obviously, you'll need to craft a succinct SQL query to obtain the data you're after.
    – jrap
    Jun 26, 2019 at 15:43
  • In "shard" database in Interactions table in Events column (as a big json string).
    – x3mxray
    Jun 26, 2019 at 15:44
  • I was told by someone else about this table, but the most recent rows inside date back to when the Migration Tool was ran - no mention of Custom Page Events created recently (today). Jun 26, 2019 at 16:37

1 Answer 1


Page Event Definitions

These are stored under /sitecore/system/Marketing Control Panel/Events When you say "Custom Page Events" you would be talking about custom ones that exist here. There are several out of the box page events such as "Page View".

As with any item in the /sitecore/system/Marketing Control Panel area, these will only work if they are in the final workflow state and have been deployed to the Reference Data database. To deploy them you need to run Deploy Marketing Definitions from control panel.

Page Event Data in Sitecore 9

Events happen as part of an Interaction, and so they will be stored on the xDB Shards [xdb_collection].[Interactions] table.

Rough equivalent query from your Sitecore 8 Mongo query (last 7 days):

SELECT [Events],[LastModified],[StartDateTime],[EndDateTime]
    FROM [Shard0].[xdb_collection].[Interactions]
    WHERE LastModified >= DATEADD(day,-7, GETDATE())
SELECT [Events],[LastModified],[StartDateTime],[EndDateTime]
    FROM [Shard1].[xdb_collection].[Interactions]
    WHERE LastModified >= DATEADD(day,-7, GETDATE())
ORDER BY [LastModified] DESC

You should then see data in the Events column in OData Json format. For example


Data not what you expected?

Most likely you need to deploy your marketing definitions and make sure there are no errors on session end from the CD (this is when the events are written to xDB).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.