|
202 | 202 |
|
203 | 203 | outQueueManager = new requestQueue.OutQueueManager(namespace); |
204 | 204 |
|
205 | | - /* |
206 | | - * Only log deprecation warnings if they won't cause an error |
207 | | - */ |
208 | | - function warn(message) { |
209 | | - if (typeof console !== undefined) { |
210 | | - console.log(message); |
211 | | - } |
212 | | - } |
213 | | - |
214 | 205 | /* |
215 | 206 | * Initializes an empty ecommerce |
216 | 207 | * transaction and line items |
|
1018 | 1009 | * @param int|string appId |
1019 | 1010 | */ |
1020 | 1011 | setAppId: function (appId) { |
1021 | | - warn('setAppId is deprecated. Instead add an "appId" field to the argmap argument of newTracker.'); |
| 1012 | + helpers.warn('setAppId is deprecated. Instead add an "appId" field to the argmap argument of newTracker.'); |
1022 | 1013 | configTrackerSiteId = appId; |
1023 | 1014 | }, |
1024 | 1015 |
|
|
1073 | 1064 | * @param string cookieNamePrefix |
1074 | 1065 | */ |
1075 | 1066 | setCookieNamePrefix: function (cookieNamePrefix) { |
1076 | | - warn('setCookieNamePrefix is deprecated. Instead add a "cookieName" field to the argmap argument of newTracker.'); |
| 1067 | + helpers.warn('setCookieNamePrefix is deprecated. Instead add a "cookieName" field to the argmap argument of newTracker.'); |
1077 | 1068 | configCookieNamePrefix = cookieNamePrefix; |
1078 | 1069 | }, |
1079 | 1070 |
|
|
1083 | 1074 | * @param string domain |
1084 | 1075 | */ |
1085 | 1076 | setCookieDomain: function (domain) { |
1086 | | - warn('setCookieDomain is deprecated. Instead add a "cookieDomain" field to the argmap argument of newTracker.'); |
| 1077 | + helpers.warn('setCookieDomain is deprecated. Instead add a "cookieDomain" field to the argmap argument of newTracker.'); |
1087 | 1078 | configCookieDomain = helpers.fixupDomain(domain); |
1088 | 1079 | updateDomainHash(); |
1089 | 1080 | }, |
|
1120 | 1111 | * @param number seed The seed used for MurmurHash3 |
1121 | 1112 | */ |
1122 | 1113 | setUserFingerprintSeed: function(seed) { |
1123 | | - warn('setUserFingerprintSeed is deprecated. Instead add a "userFingerprintSeed" field to the argmap argument of newTracker.'); |
| 1114 | + helpers.warn('setUserFingerprintSeed is deprecated. Instead add a "userFingerprintSeed" field to the argmap argument of newTracker.'); |
1124 | 1115 | configUserFingerprintHashSeed = seed; |
1125 | 1116 | userFingerprint = detectors.detectSignature(configUserFingerprintHashSeed); |
1126 | 1117 | }, |
|
1130 | 1121 | * @param bool enable If false, turn off user fingerprinting |
1131 | 1122 | */ |
1132 | 1123 | enableUserFingerprint: function(enable) { |
1133 | | - warn('enableUserFingerprintSeed is deprecated. Instead add a "userFingerprint" field to the argmap argument of newTracker.'); |
| 1124 | + helpers.warn('enableUserFingerprintSeed is deprecated. Instead add a "userFingerprint" field to the argmap argument of newTracker.'); |
1134 | 1125 | if (!enable) { |
1135 | 1126 | userFingerprint = ''; |
1136 | 1127 | } |
|
1144 | 1135 | * @param bool enable If true and Do Not Track feature enabled, don't track. |
1145 | 1136 | */ |
1146 | 1137 | respectDoNotTrack: function (enable) { |
1147 | | - warn('This usage of respectDoNotTrack is deprecated. Instead add a "respectDoNotTrack" field to the argmap argument of newTracker.'); |
| 1138 | + helpers.warn('This usage of respectDoNotTrack is deprecated. Instead add a "respectDoNotTrack" field to the argmap argument of newTracker.'); |
1148 | 1139 | var dnt = navigatorAlias.doNotTrack || navigatorAlias.msDoNotTrack; |
1149 | 1140 |
|
1150 | 1141 | configDoNotTrack = enable && (dnt === 'yes' || dnt === '1'); |
|
1307 | 1298 | * @param string platform Overrides the default tracking platform |
1308 | 1299 | */ |
1309 | 1300 | setPlatform: function(platform) { |
1310 | | - warn('setPlatform is deprecated. Instead add a "platform" field to the argmap argument of newTracker.'); |
| 1301 | + helpers.warn('setPlatform is deprecated. Instead add a "platform" field to the argmap argument of newTracker.'); |
1311 | 1302 | configPlatform = platform; |
1312 | 1303 | }, |
1313 | 1304 |
|
|
1318 | 1309 | * @param boolean enabled A boolean value indicating if the Base64 encoding for unstructured events should be enabled or not |
1319 | 1310 | */ |
1320 | 1311 | encodeBase64: function (enabled) { |
1321 | | - warn('This usage of encodeBase64 is deprecated. Instead add an "encodeBase64" field to the argmap argument of newTracker.'); |
| 1312 | + helpers.warn('This usage of encodeBase64 is deprecated. Instead add an "encodeBase64" field to the argmap argument of newTracker.'); |
1322 | 1313 | configEncodeBase64 = enabled; |
1323 | 1314 | }, |
1324 | 1315 |
|
|
1484 | 1475 | * @param object Custom context relating to the event |
1485 | 1476 | */ |
1486 | 1477 | trackImpression: function (bannerId, campaignId, advertiserId, userId, context) { |
1487 | | - warn('Snowplow: trackImpression is deprecated. When version 1.1.0 is released, switch to trackAdImpression.'); |
| 1478 | + helpers.warn('Snowplow: trackImpression is deprecated. When version 1.1.0 is released, switch to trackAdImpression.'); |
1488 | 1479 | logImpression(bannerId, campaignId, advertiserId, userId, context); |
1489 | 1480 | }, |
1490 | 1481 |
|
|
0 commit comments