PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 All 106 releases
wp-parsely / src / js / lib / uuid-profile-call.ts

uuid-profile-call.ts in Parse.ly 3.24.2, at src/js/lib/uuid-profile-call.ts

21 lines 669 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { PUBLIC_API_BASE_URL } from '../../content-helper/common/utils/constants';
2
3 // Only enqueuing the action if the site has a defined Site ID.
4 if ( typeof window.wpParselySiteId !== 'undefined' ) {
5 window.wpParselyHooks?.addAction( 'wpParselyOnLoad', 'wpParsely', uuidProfileCall );
6 }
7
8 async function uuidProfileCall() {
9 const uuid = window.PARSELY?.config?.parsely_site_uuid;
10
11 if ( ! ( window.wpParselySiteId && uuid ) ) {
12 return;
13 }
14
15 const url = `${ PUBLIC_API_BASE_URL }/profile?apikey=${ encodeURIComponent(
16 window.wpParselySiteId
17 ) }&uuid=${ encodeURIComponent( uuid ) }&url=${ encodeURIComponent( window.location.href ) }`;
18
19 return fetch( url );
20 }
21