Created
February 15, 2018 15:57
-
-
Save davidknipe/f43509547ec5f4a3df3e04d1b655f7d7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| using EPiServer.ServiceLocation; | |
| using EPiServer.Tracking.Core; | |
| namespace InsightScopes.Business.ChangeScope | |
| { | |
| [ServiceConfiguration(ServiceType = typeof(ITrackingDataInterceptor), Lifecycle = ServiceInstanceScope.Singleton)] | |
| public class CustomScopeInterceptor : ITrackingDataInterceptor | |
| { | |
| public int SortOrder => int.MaxValue; // Ensure the interceptor fires last | |
| public void Intercept<TPayload>(TrackingData<TPayload> trackingData) | |
| { | |
| trackingData.Scope = "MyCustomScope"; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment