File tree Expand file tree Collapse file tree 3 files changed +12
-70
lines changed Expand file tree Collapse file tree 3 files changed +12
-70
lines changed Original file line number Diff line number Diff 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');
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments