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