Skip to content

Commit

Permalink
[MARKENG-3382][c] update pmt from v.1.1.12 to v2.0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Swisher authored and Brian Swisher committed Jun 12, 2024
1 parent f4b58eb commit 68cce83
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 72 deletions.
32 changes: 11 additions & 21 deletions bff.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ const prefetch = async () => {
let pmTech = '';

if (process.env.PM_TECH) {
pmTech = await fetchPmTech();

pmTech = pmTech;
pmTech = sh.exec('cat scripts/pmt.js').stdout;

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

Expand Down Expand Up @@ -75,28 +73,20 @@ const prefetch = async () => {
const script = (process.env.PM_TECH
&& `
${pmTech}
if (typeof window.pm.scalp !== 'function') {
window.pm.setScalp({
property: 'api-gateways'
});
}
window.pm.driveCampaignId();
function isPmTechAllowed(documentLocationPathname) {
return ${allowedPmTech[0] === '*' ||
allowedPmTech.indexOf(documentLocationPathname) !== -1};
}
var d = 1000, int;
var int = setInterval(function(){
if (document.body) {
window.pm.scalp(
setTimeout(function(){
var propertyName = 'api-gateways';
if (window.pmt) {
window.pmt('setScalp', [{
property: propertyName
}]);
window.pmt('scalp', [
'pm-analytics',
'load',
document.location.pathname
);
window.pm.trackClicks();
clearInterval(int);
]);
window.pmt('trackClicks');
}
}, d);
}, 1000);
`)
|| `
console.info('Postman OSS');
Expand Down
51 changes: 0 additions & 51 deletions scripts/fetchPmTech.js

This file was deleted.

1 change: 1 addition & 0 deletions scripts/pmt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 68cce83

Please sign in to comment.