Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Stephen Geppi Posted June 28, 2016 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.
Stephen Geppi Posted June 28, 2016 Author 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.