diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-04-08 09:20:09 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-04-08 09:20:09 +0300 |
commit | ff1c579f1faa003e461db2534f2606bd4ac4ddaa (patch) | |
tree | 15c28038691f27efb1c68603bb7e434e34788b9c /tests/javascript/index.php | |
parent | 51ac534345e965adec4a7e5cbcf30901d8631486 (diff) |
Reset tracked impressions for searches and only send tracking request when interaction was defined (#14002)
* Reset tracked impressions for searches and only send tracking request when interaction was defined
* add test to ensure site search clears content impressions
Diffstat (limited to 'tests/javascript/index.php')
-rw-r--r-- | tests/javascript/index.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php index e0c8e7ffa3..1de34609ac 100644 --- a/tests/javascript/index.php +++ b/tests/javascript/index.php @@ -1784,6 +1784,7 @@ function PiwikTest() { }); test("ContentTrackerInternals", function() { + expect(151); var tracker = Piwik.getTracker(); var actual, expected, trackerUrl; @@ -2010,6 +2011,9 @@ function PiwikTest() { propEqual(actual, [], 'buildContentImpressionsRequests, nothing tracked as supposed to be ignored'); propEqual(tracker.getTrackedContentImpressions(), [impression], 'buildContentImpressionsRequests, impression should be ignored as it was already tracked before'); + tracker.trackSiteSearch() + propEqual(tracker.getTrackedContentImpressions(), [], 'trackSiteSearch, resets tracked impressions'); + tracker.clearTrackedContentImpressions(); _s('#ignoreInteraction1').contentInteractionTrackingSetupDone = false; tracker.buildContentImpressionsRequests([impression], [_s('#ex101')]); |