Stephen Geppi Posted June 28, 2016 Share Posted June 28, 2016 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. Link to comment Share on other sites More sharing options...
Stephen Geppi Posted June 28, 2016 Author Share Posted June 28, 2016 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.