Hello!
Im trying to add Intercom chat to my logged-in costumers but I need help to find the php vars of:
Firstname
Email
Registered Date
These details was not in any php vars or cookies on all pages of client panel?
Im trying to add Intercom chat to my logged-in costumers but I need help to find the php vars of:
Firstname
Registered Date
These details was not in any php vars or cookies on all pages of client panel?
The intercom API does not use any local php vars nor cookies due to the enforced oAuth encoding protection throughout their system. In order to re-track an existing user in intercom, you need to use a provided token while calling intercom systematically and then view the related user ID and the email address.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
See the Intercom code for already-costumers:
I need the Firstname + Email + 'account created time' of my clients when they are online and logged on my OC store, understand?
Sorry for my bad english.
Code: Select all
<script>
window.intercomSettings = {
app_id: "MY_APP_ID",
name: "<?php echo $current_user->name ?>", // Full name
email: "<?php echo $current_user->email ?>", // Email address
created_at: <?php echo strtotime($current_user->created_at) ?> // Signup date as a Unix timestamp
};
</script>
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/q6151jm5';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
Sorry for my bad english.
I would suggest to contact the developer of the extension you're using or to contact intercom for more information on your request.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 1 guest