• Hello everyone,

    My website uses Tidio Live Chat. They do have a WordPress plugin, however, it doesn’t support pulling the user’s information into it’s platform by default. To do this, I have to use Tidio’s documentation here: https://docs.tidiochat.com/#defining-visitor-data

    I know very little about this stuff, but I was chatting with their support and they tried to help me integrate it, but it’s still not pulling the information over.

    If you guys could take a look at it and tell me what I’m doing wrong, that would be greatly appreciated.

    $current_user = wp_get_current_user();
        document.tidioIdentify = {
        distinct_id: '$current_user->ID', // Unique user ID in your system
        email: '$current_user->user_email', // User email
        name: '$current_user->display_name', // Visitor name
    };
Viewing 2 replies - 1 through 2 (of 2 total)
  • It looks like a mixture of PHP and JS.

    Hi Michael, if the snippet you presented is in some kind of a php file, you’ll need to do it like this:

    $current_user = wp_get_current_user();
    echo "<script> document.tidioIdentify = {
        distinct_id: '" . $current_user->ID . "', 
        email: '" . $current_user->user_email . "', 
        name: '" . $current_user->display_name . "', 
    };</script>";

    This way you can put your user data on the page as a Javascript object which is required by the Tidio widget.

    I hope this makes sense and will help you with your development. Feel free to contact us again in case of any questions.

    Cheers and Happy New Year!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trying to Pull User Information Into Tidio Chat’ is closed to new replies.