Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 28, 20168 yr Hi there IPS community! I'm looking for what the variables are and how to echo them for the currently logged in user's display name and their email address so that I can send it to Olark. If anyone has done Olark's visitor API integration before your assistance is greatly appreciated. Really, all I need to know is what the variables are and how to echo username and email. Thank you.
June 28, 20168 yr Author EDIT: I've found how to do it. Make a new custom block in your AdminCP, use PHP as your language, and enter this code: require_once( './init.php' ); \IPS\Session\Front::i(); $member = \IPS\Member::loggedIn(); ?> <script> olark('api.visitor.updateFullName', { fullName: "<?php print htmlspecialchars($member->name, ENT_QUOTES); ?>" }); olark('api.visitor.updateEmailAddress', { emailAddress: "<?php print htmlspecialchars($member->email, ENT_QUOTES); ?>" }); </script> Hopefully this will be of assistance to anyone who needs it.
Archived
This topic is now archived and is closed to further replies.