Skip to content

Commit d6d7dc8

Browse files
committed
Stoped caching PerformanceTiming context (closes snowplow#339)
1 parent 92168e4 commit d6d7dc8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/js/tracker.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,6 @@
237237
// Context to be added to every event
238238
commonContexts = [];
239239

240-
if (autoContexts.performanceTiming) {
241-
commonContexts.push(getPerformanceTimingContext());
242-
}
243-
244240
if (autoContexts.gaCookies) {
245241
commonContexts.push(getGaCookiesContext());
246242
}
@@ -640,7 +636,11 @@
640636
* @return userContexts combined with commonContexts
641637
*/
642638
function addCommonContexts(userContexts) {
643-
return commonContexts.concat(userContexts || []);
639+
var combinedContexts = commonContexts.concat(userContexts || []);
640+
if (autoContexts.performanceTiming) {
641+
combinedContexts.push(getPerformanceTimingContext());
642+
}
643+
return combinedContexts;
644644
}
645645

646646
/**

0 commit comments

Comments
 (0)