Viewing 1 replies (of 1 total)
  • Plugin Author Nick Ciske

    (@nickciske)

    You can look at Daddy Analytics to capture a ton of user info, including their entire path through your site:
    https://daddyanalytics.com

    Or you can store the referrer (if the browser provides it in the HTTP header) in a hidden field using a PHP filter (see salesforce_w2l_field_value in Other Notes).

    For example:

    add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_referrer_example', 10, 3 );
    
    function salesforce_w2l_field_value_referrer_example( $val, $field, $form ){
    
    	$form_id = 1;
    	$field_name = 'referrer';
    
    	if( $form == $form_id && $field_name == $field ){
    		if( isset( $_SERVER['HTTP_REFERER'] ) ){
    			return $_SERVER['HTTP_REFERER'];
    		}
    	}
    
    	return $val;
    
    }

    Note that you’d need to change the $form_id and $field_name to match your form and the field you want to store the referrer in.

Viewing 1 replies (of 1 total)
  • The topic ‘Saving Referrer Page’ is closed to new replies.