Something really weird. I have a custom Submit action for my forms that works great. But when I try and access the Sitecore.Analytics.Tracker, it is null. But only when in Ajax mode. When Ajax is turned off and normal POST actions are performed it works fine.

No errors in the log and all Sitecore related properties seem fine; Like site, context, DB, page, etc... Its like it is just turned off in Ajax mode.

public class SendMailAction : SubmitActionBase<SendMailActionData>


Anyone experienced this?


I tried to use AnalyticsActionBase from Sitecore.ExperienceForms.SubmitActions, but it only exposes adding Goals, Campaigns and Outcomes. Not the tracker itself.

1 Answer 1


I also faced same issue so I have applied below code and it resolved my issue:

if (Tracker.Current == null && Tracker.Enabled) { 
  • Thanks. I could not find another way to do it.
    – Chris Auer
    Jul 23, 2019 at 14:59
  • I'll report this as a bug and see what comes of it
    – Chris Auer
    Jul 23, 2019 at 17:21
  • I also found that this is a bug. Please share if you will find any other solution Jul 23, 2019 at 17:46

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.