borisprado Posted March 26, 2018 Share Posted March 26, 2018 Hello need help to insert the tracking code of intercom (chat support system), the basic track code its working, i insert the code on the footer using "literal" BUT to track the basic customer data of the customer (when its log in), i need 3 variables that i dont know what to insert or what to put or how to put it, i need the name, email and created_at (creation date i guess is this one), please someone can give me the 3 variables and how to insert them into the code below. THK {literal} <script> window.intercomSettings = { app_id: "XXXXXXX" name: <%= current_user.name %>, // Full name email: <%= current_user.email %>, // Email address created_at: <%= current_user.created_at.to_i %> // Signup Date }; </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/uo96gwvw';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);[spam-filter]})()</script> {/literal} Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted March 26, 2018 Share Posted March 26, 2018 Hi... Here is some smarty variable you want use in your smarty templatehttps://www.prestashop.com/forums/topic/57122-global-smarty-variables-used-in-prestashop/ Thanks Link to comment Share on other sites More sharing options...
vekia Posted April 13, 2018 Share Posted April 13, 2018 On 3/26/2018 at 2:47 PM, borisprado said: Hello need help to insert the tracking code of intercom (chat support system), the basic track code its working, i insert the code on the footer using "literal" BUT to track the basic customer data of the customer (when its log in), i need 3 variables that i dont know what to insert or what to put or how to put it, i need the name, email and created_at (creation date i guess is this one), please someone can give me the 3 variables and how to insert them into the code below. THK {literal} <script> window.intercomSettings = { app_id: "XXXXXXX" name: <%= current_user.name %>, // Full name email: <%= current_user.email %>, // Email address created_at: <%= current_user.created_at.to_i %> // Signup Date }; </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/uo96gwvw';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);[spam-filter]})()</script> {/literal} what is the version of the prestashop where you want to use it ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now