mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
25 lines
657 B
PHP
25 lines
657 B
PHP
<?php
|
|
|
|
/***
|
|
*** @add an impression to form
|
|
***/
|
|
add_action('um_before_form_is_loaded', 'um_add_page_view');
|
|
function um_add_page_view($args){
|
|
global $ultimatemember;
|
|
extract($args);
|
|
if ( isset( $form_id ) ) {
|
|
if ( !isset( $impressions ) ) $impressions = 0;
|
|
$ultimatemember->form->add_pageview( $form_id, $impressions );
|
|
}
|
|
}
|
|
|
|
/***
|
|
*** @track a successful event
|
|
***/
|
|
add_action('track_approved_user_login', 'um_add_conversion');
|
|
add_action('track_approved_user_registration', 'um_add_conversion');
|
|
function um_add_conversion($args){
|
|
global $ultimatemember;
|
|
extract($args);
|
|
$ultimatemember->form->add_conversion( $form_id );
|
|
} |