Skip to content

Commit

Permalink
add user info for product fruits
Browse files Browse the repository at this point in the history
CPCN-194
  • Loading branch information
petrjasek committed Apr 19, 2024
1 parent 5489d79 commit 90a9d5f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion server/theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@
w.productFruits=w.productFruits||{};w.productFruits.scrV='2';
let a=d.getElementsByTagName('head')[0];let r=d.createElement('script');r.async=1;r.src=u;a.appendChild(r);
})(window,document,'https://app.productfruits.com/static/script.js');
$productFruits.push(['init', '{{ config.PRODUCTFRUITS_WORKSPACE_CODE }}', '{{ get_locale()[:2] }}', { username: '{{ hash(auth_user._id) }}' }]);
$productFruits.push(['init', '{{ config.PRODUCTFRUITS_WORKSPACE_CODE }}', '{{ get_locale()[:2] }}', {
username: '{{ auth_user.email }}',
firstname: '{{ auth_user.first_name }}',
lastname: '{{ auth_user.last_name }}',
role: '{{ auth_user.user_type }}',
props: {
company: '{{ get_user_profile_data().companyName }}',
phone: '{{ auth_user.phone }}',
mobile: '{{ auth_user.mobile }}',
},
}]);
</script>
{% endif %}
{% endblock %}

0 comments on commit 90a9d5f

Please sign in to comment.