Skip to content

Commit 68cce83

Browse files
Brian SwisherBrian Swisher
authored andcommitted
[MARKENG-3382][c] update pmt from v.1.1.12 to v2.0.22
1 parent f4b58eb commit 68cce83

File tree

3 files changed

+12
-72
lines changed

3 files changed

+12
-72
lines changed

bff.js

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ const prefetch = async () => {
4242
let pmTech = '';
4343

4444
if (process.env.PM_TECH) {
45-
pmTech = await fetchPmTech();
46-
47-
pmTech = pmTech;
45+
pmTech = sh.exec('cat scripts/pmt.js').stdout;
4846

4947
sh.exec('mkdir -p public');
5048

@@ -75,28 +73,20 @@ const prefetch = async () => {
7573
const script = (process.env.PM_TECH
7674
&& `
7775
${pmTech}
78-
if (typeof window.pm.scalp !== 'function') {
79-
window.pm.setScalp({
80-
property: 'api-gateways'
81-
});
82-
}
83-
window.pm.driveCampaignId();
84-
function isPmTechAllowed(documentLocationPathname) {
85-
return ${allowedPmTech[0] === '*' ||
86-
allowedPmTech.indexOf(documentLocationPathname) !== -1};
87-
}
88-
var d = 1000, int;
89-
var int = setInterval(function(){
90-
if (document.body) {
91-
window.pm.scalp(
76+
setTimeout(function(){
77+
var propertyName = 'api-gateways';
78+
if (window.pmt) {
79+
window.pmt('setScalp', [{
80+
property: propertyName
81+
}]);
82+
window.pmt('scalp', [
9283
'pm-analytics',
9384
'load',
9485
document.location.pathname
95-
);
96-
window.pm.trackClicks();
97-
clearInterval(int);
86+
]);
87+
window.pmt('trackClicks');
9888
}
99-
}, d);
89+
}, 1000);
10090
`)
10191
|| `
10292
console.info('Postman OSS');

scripts/fetchPmTech.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

scripts/pmt.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)