Skip to content

Commit 54975ad

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 54975ad

File tree

3 files changed

+12
-70
lines changed

3 files changed

+12
-70
lines changed

bff.js

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const prefetch = async () => {
4444
if (process.env.PM_TECH) {
4545
pmTech = await fetchPmTech();
4646

47-
pmTech = pmTech;
47+
pmTech = sh.exec('cat scripts/pmt.js').stdout;
4848

4949
sh.exec('mkdir -p public');
5050

@@ -75,28 +75,20 @@ const prefetch = async () => {
7575
const script = (process.env.PM_TECH
7676
&& `
7777
${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(
78+
setTimeout(function(){
79+
var propertyName = 'api-gateways';
80+
if (window.pmt) {
81+
window.pmt('setScalp', [{
82+
property: propertyName
83+
}]);
84+
window.pmt('scalp', [
9285
'pm-analytics',
9386
'load',
9487
document.location.pathname
95-
);
96-
window.pm.trackClicks();
97-
clearInterval(int);
88+
]);
89+
window.pmt('trackClicks');
9890
}
99-
}, d);
91+
}, 1000);
10092
`)
10193
|| `
10294
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)