Download wp-calypso/client/lib/analytics/identify-user.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 689 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/analytics/identify-user.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/analytics/identify-user.js
-
curl -L -o identify-user.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/analytics/identify-user.js
689 Bytes
| import { | |
| identifyUser as baseIdentifyUser, | |
| getTracksAnonymousUserId, | |
| getCurrentUser, | |
| } from '@automattic/calypso-analytics'; | |
| import debugModule from 'debug'; | |
| import { recordAliasInFloodlight } from 'calypso/lib/analytics/ad-tracking'; | |
| /** | |
| * Module variables | |
| */ | |
| const debug = debugModule( 'calypso:analytics:identifyUser' ); | |
| export function identifyUser( userData ) { | |
| baseIdentifyUser( userData ); | |
| // neccessary because calypso-analytics/initializeAnalytics no longer calls out to ad-tracking | |
| const user = getCurrentUser(); | |
| if ( 'object' === typeof userData && user && getTracksAnonymousUserId() ) { | |
| debug( 'recordAliasInFloodlight', user ); | |
| recordAliasInFloodlight(); | |
| } | |
| } | |