Skip to content

Commit 6ef3ab1

Browse files
committed
Reinstated the performanceTiming argument to trackPageView for backward compatibility
1 parent 600cfdc commit 6ef3ab1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/js/tracker.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,9 +1229,15 @@
12291229
* Log visit to this page
12301230
*
12311231
* @param string customTitle
1232+
* @param boolean DEPRECATED performanceTiming
12321233
* @param object Custom context relating to the event
12331234
*/
1234-
trackPageView: function (customTitle, context) {
1235+
trackPageView: function (customTitle, performanceTiming, context) {
1236+
if (performanceTiming !== true && performanceTiming !== false) {
1237+
context = context || performanceTiming;
1238+
} else {
1239+
helpers.warn('The performanceTiming argument to trackPageView is deprecated. Instead use the "contexts" field in the argmap argument of newTracker.');
1240+
}
12351241
trackCallback(function () {
12361242
logPageView(customTitle, context);
12371243
});

0 commit comments

Comments
 (0)