custom/plugins/NewsletterSendinblue/src/Resources/views/storefront/layout/meta.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
  2. {% block layout_head_javascript_tracking %}
  3.     {{ parent() }}
  4.     {% if sendinblueIsPageTrackingEnabled == true %}
  5.         <script type="text/javascript">(function () {
  6.                 window.sib = {equeue: [], client_key: "{{ sendinblueMAKey }}"};
  7.                 {% if sendinblueUserEmail is not empty %}window.sib.email_id = '{{ sendinblueUserEmail }}';
  8.                 {% endif %}window.sendinblue = {};
  9.                 for (var j = ['track', 'identify', 'trackLink', 'page'], i = 0; i < j.length; i++) {
  10.                     (function (k) {
  11.                         window.sendinblue[k] = function () {
  12.                             var arg = Array.prototype.slice.call(arguments);
  13.                             (window.sib[k] || function () {
  14.                                 var t = {};
  15.                                 t[k] = arg;
  16.                                 window.sib.equeue.push(t);
  17.                             })(arg[0], arg[1], arg[2]);
  18.                         };
  19.                     })(j[i]);
  20.                 }
  21.                 var n = document.createElement("script"), i = document.getElementsByTagName("script")[0];
  22.                 n.type = "text/javascript", n.id = "sendinblue-js", n.async = !0, n.src = "https://sibautomation.com/sa.js?key=" + window.sib.client_key, i.parentNode.insertBefore(n, i), window.sendinblue.page();
  23.             })();</script>
  24.     {% endif %}
  25. {% endblock %}