templates/_include/pendo.html.twig line 1

Open in your IDE?
  1. {% if app.user %}
  2. <script>
  3. (function(apiKey){
  4. (function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=o._q||[];
  5. v=['initialize','identify','updateOptions','pageLoad','track'];for(w=0,x=v.length;w<x;++w)(function(m){
  6. o[m]=o[m]||function(){o._q[m===v[0]?'unshift':'push']([m].concat([].slice.call(arguments,0)));};})(v[w]);
  7. y=e.createElement(n);y.async=!0;y.src='https://cdn.pendo.io/agent/static/'+apiKey+'/pendo.js';
  8. z=e.getElementsByTagName(n)[0];z.parentNode.insertBefore(y,z);})(window,document,'script','pendo');
  9. })('{{ pendo_api_key }}');
  10. pendo.initialize({
  11. visitor: {
  12. id: '{{ app.user.email }}',
  13. email: '{{ app.user.email }}',
  14. firstName: '{{ app.user.firstName }}',
  15. lastName: '{{ app.user.lastName }}',
  16. },
  17. account: {
  18. id: '{{ app.user.owningCompanies|first.id}}',
  19. name: '{{ app.user.owningCompanies|first.name }}',
  20. }
  21. });
  22. </script>
  23. {% endif %}