Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Fixed issue AttackPattern#47 Session start and session end time stamp…
Browse files Browse the repository at this point in the history
…s registered at GA are very often too late relative to other events.
  • Loading branch information
11RS committed Sep 6, 2017
1 parent 5013872 commit 37b239b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ public void MeasurementAnalyticsClient_AdjustUriBeforeRequest_Adds_Qt_Parameter(
StringAssert.Contains(actual.Query, "qt=");
}

[TestMethod]
public void MeasurementAnalyticsClient_AdjustUriBeforeRequest_Does_Not_Add_Qt_Parameter_If_Sc_Parameter_Present()
{
var originalUri = new Uri("http://anything.really.com/something?sc=start#" + DateTime.UtcNow.ToString("o"));

var actual = new MeasurementAnalyticsClient().AdjustUriBeforeRequest(originalUri);

Assert.IsFalse(actual.Query.Contains("qt="));
}

[TestMethod]
public void MeasurementAnalyticsClient_AdjustUriBeforeRequest_Clears_Fragment()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public void TrackTimedEvent(string category, string variable, TimeSpan time, str
/// <param name="parameters">URI parameters to add the relative QT parameter to.</param>
private static void AddQueueTimeFromFragment(Uri uri, IDictionary<string, string> parameters)
{
if (String.IsNullOrWhiteSpace(uri.Fragment) || parameters.ContainsKey("sc")) return;
if (String.IsNullOrWhiteSpace(uri.Fragment)) return;
var decodedFragment = uri.GetComponents(UriComponents.Fragment, UriFormat.Unescaped);

DateTime utcHitTime;
Expand Down

0 comments on commit 37b239b

Please sign in to comment.