Page Events (defined in /sitecore/system/settings/Analytics/Page Events) cann be triggered like this:

var pageEventDefinition = Sitecore.Analytics.Tracker.MarketingDefinitions.PageEvents[pageEventId];

How can I trigger a Generic Event? (defined in /sitecore/system/Marketing Control Panel/Events)

enter image description here

There is no property for these on the Sitecore.Analytics.Tracker.MarketingDefinitions object.

  • Generic Events are being used by System as System event so I don't think we should touch it, do you have any specific requirement for this? Mar 9, 2020 at 10:38
  • What happens when you try to get a system event by id from Sitecore.Analytics.Tracker.MarketingDefinitions.PageEvents?
    – grg
    Mar 9, 2020 at 10:39
  • @grg Sitecore.Analytics.Tracker.MarketingDefinitions.PageEvents doesn't contain these genereic events. I've tried that already.
    – Mark Lowe
    Mar 13, 2020 at 10:26

2 Answers 2


You can go with Definition managers as well, these are used to get marketing activities including the events. below example is to get the get definition manager in a Sitecore context and after that, you can get the event with the event id -

 IDefinitionManager<IEventDefinition> eventDefinitionManager = ServiceLocator.ServiceProvider.GetDefinitionManagerFactory().GetDefinitionManager<IEventDefinition>();
 Guid eventId = Guid.Parse("YourEventID");
 //below line will give you the latest active version
 IEventDefinition marketingEvent = eventDefinitionManager.Get(eventId, new CultureInfo("da"));
 //you need to convert the marketing event into IPageEventDefinition

If you will see the inheritance of the Page Event items it is inheriting the Event template which is the same template use to create Generic events and in the RegisterPageEvent code its ultimately converting the IPageEventDefinition into IEventDefinition and calling a protected Register method.


I would tend to agree with the comment above that system events should not be used by custom implementations, but if you really need that, you can create PageEventDefinition manually and register the event:

    Item pageViewItem = Sitecore.Context.Database.GetItem(new ID("{9326CB1E-CEC8-48F2-9A3E-91C7DBB2166C}"));
    PageEventDefinition pageViewEvent = new PageEventDefinition(pageViewItem.ID.Guid, pageViewItem.Name, Sitecore.Context.Culture, pageViewItem.Name, pageViewItem.Statistics.Created, pageViewItem.Statistics.CreatedBy);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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