• Hi! I am trying to get the conversion paths for our forms.
    I was able to create a shortcode however it does not contain the path where the user submitted the form.

    Here’s my shortcode:

    function conversion_path_to_crm() {
    
            if (isset($_COOKIE['_cp'])) {
    
                $paths = ltrim($_COOKIE['_cp'], '|');
    
                if ($paths != '') {
    
                    $paths = explode('|', $paths);
    
                    $sliced = array_slice($paths, -5);
    
                    $final_path = '';
    
                    foreach ($sliced AS $path) {
    
                        $path = explode(',,', $path);
    
                        $path = $path[0] . ' - ' . $path[1] . '<br/>';
    
                        $final_path .= $path;
    
                    }
    
                     return $final_path;
    
                }
    
            }
    
        }
    
        add_shortcode('BP_CONVERSION_PATH', 'conversion_path_to_crm');  

    I hope someone will help me on this.

    Thanks in advance!

    The page I need help with: [log in to see the link]

The topic ‘Get conversion path’ is closed to new replies.