Auto Event Tracking - How to turn off?

Jan 3, 2013 at 6:23 AM
Edited Jan 4, 2013 at 12:20 AM

I am having issues when using WebAnalyticsService, that it is logging all sorts of application events that I dont want sent to my analytics provider as it skews my results.

If I configure my analytics provider (Omniture) in the page interaction.behaviors it works like a charm and happily logs away only logging specifically what I send.

 

<in:Interaction.Behaviors>
      <analytics:AppMeasurement account="xyz"
                                   pageName="{}{msaf.EventArgs.pageName}"
                                   prop1="{}{msaf.EventArgs.prop1}"
                                   prop2="{}{msaf.EventArgs.prop2}"
                                   prop3="{}{msaf.EventArgs.prop3}"
                                   prop4="{}{msaf.EventArgs.prop4}"/>
      </in:Interaction.Behaviors>

 

However since I require OOB (Out-Of-Browser) logging, as per the doco, I have configured it using a WebAnalyticsService in the ApplicationLifetimeObjects. However I get a heap of Application events like Exiting, Exited, NavigationStateChanged, Starting and Started events logging to my Analytics provider and skewing my results. Each event appears as a page view for the host asp.net page. These do not appear when using the behaviors method.  I have set the WebAnalyticsService properties IsPageTrackingEnabled & AreApplicationLifetimeEventsEnabled to false, but they still come through. What am I missing?

 

<Application.ApplicationLifetimeObjects>
        <mwa:WebAnalyticsService IsPageTrackingEnabled="False" AreApplicationLifetimeEventsEnabled="False">
            <mwa:WebAnalyticsService.Services> 
                <oa:AppMeasurement account="xyz"
                                   pageName="{}{msaf.EventArgs.pageName}"
                                   prop1="{}{msaf.EventArgs.prop1}"
                                   prop2="{}{msaf.EventArgs.prop2}"
                                   prop3="{}{msaf.EventArgs.prop3}"
                                   prop4="{}{msaf.EventArgs.prop4}"/>
            </mwa:WebAnalyticsService.Services>
        </mwa:WebAnalyticsService>
    </Application.ApplicationLifetimeObjects>
Jan 4, 2013 at 12:19 AM
Edited Jan 4, 2013 at 12:21 AM

I think that I may be on to something, when looking through the code I found that the configured value WebAnalyticsService.IsPageTrackingEnabled is used by WebAnalyticsService.OnFrameNavigated() to conditionally restrict the logging of data

 

if (this.IsPageTrackingEnabled)
{
	var logEvent = new AnalyticsEvent
	{
		ActionValue = e.Uri.ToString(),
		HitType = Data.HitType.PageView,
		Name = "CurrentScreenChanged",
		NavigationState = e.Uri.ToString(),
		ObjectType = sender.GetType().Name
	};

	this.Log(logEvent);
}

 

However when I checked the WebAnalyticsService.AreApplicationLifetimeEventsEnabled property I found it is not referenced anywhere. I would have expected that it would have been similarly used in WebAnalyticsService methods Exited, Exiting, Started and Starting to conditionally include a log based on this variable. Has this been over looked?

Similarly the NavigationStateChanged event in DataCollector.Host_NavigationStateChanged has no conditional logic to govern it's logging. Could this also be modified to either use the existing property or a new one to govern its logging to address this?

Jan 5 at 7:03 AM