Last active
August 20, 2021 18:52
-
-
Save rdhimanam/d40bd35740babc67e86fea8857399aee to your computer and use it in GitHub Desktop.
Track correct code for Passster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function monsterinsights_passter_track_correct_code( $input ) { | |
// Check if Passster is active. | |
if ( ! function_exists( 'ps_fs' ) ) { | |
return; | |
} | |
if ( ! function_exists( 'monsterinsights_mp_track_event_call' ) ) { | |
return; | |
} | |
$args = array( | |
't' => 'event', // Required: Change the default type to event | |
'ec' => 'Passster', // Required: Event Category | |
'ea' => 'Correct Code', // Required: Event Action | |
'el' => $input, // Required: Event Label (User Input) | |
'ev' => '', // Required: Event Value, Rounded | |
'cid' => ! monsterinsights_get_uuid() ? monsterinsights_generate_uuid() : monsterinsights_get_uuid(), // Required: Google Client ID | |
); | |
monsterinsights_mp_track_event_call( $args ); | |
} | |
add_action( 'passster_validation_success', 'monsterinsights_passter_track_correct_code' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment