You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to conditionally do something in Liquid that depends on the user having given consent to tracking, you can't really do that, since you can't access ITrackingConsentFeature. So, let's add a Liquid tag that provides this information as a bool that you can use in ifs. Essentially, we want to be able to do the equivalent of this in Liquid:
vartrackingConsentFeature= _hca.HttpContext.Features.Get<ITrackingConsentFeature>();if(trackingConsentFeature isnull|| trackingConsentFeature.CanTrack){// Only insert the tracking script here.}
This would be useful for including custom analytics scripts in DotNest Media Themes (though for DotNest OrchardCMS/OrchardCore#13825 would work too).
If you want to conditionally do something in Liquid that depends on the user having given consent to tracking, you can't really do that, since you can't access
ITrackingConsentFeature
. So, let's add a Liquid tag that provides this information as abool
that you can use inif
s. Essentially, we want to be able to do the equivalent of this in Liquid:This would be useful for including custom analytics scripts in DotNest Media Themes (though for DotNest OrchardCMS/OrchardCore#13825 would work too).
Jira issue
The text was updated successfully, but these errors were encountered: