modules/CSI/CustomScripts/templates/web/customer/modules/CSI/CustomScripts/google_tag.twig line 1

Open in your IDE?
  1. {##
  2.  # Custom scripts
  3.  #
  4.  # @category  X-Cart_5_5_Module
  5.  # @package   CustomScripts
  6.  # @author    CFL Systems, Inc. <support@cflsystems.com>
  7.  # @copyright 2023 CFL Systems, Inc. All rights reserved.
  8.  # @license   License Agreement https://www.cflsystems.com/software-license-agreement.html
  9.  # @link      https://www.cflsystems.com/
  10.  #
  11.  # @ListChild (list="footer", weight="400")
  12.  #}
  13. {% if this.get('config').CSI.CustomScripts.googleTag != '' %}
  14.   <!-- Google tag (gtag.js) -->
  15.   <script async src="https://www.googletagmanager.com/gtag/js?id={{ this.get('config').CSI.CustomScripts.googleTag }}"></script>
  16.   <script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '{{ this.get("config").CSI.CustomScripts.googleTag }}');</script>
  17.   <!-- Event snippet for Created a profile (1) conversion page -->
  18.   <script>gtag('event', 'conversion', {'send_to': '{{ this.get("config").CSI.CustomScripts.googleTag }}/PMqUCMeg5pQYEOCShJgD'});</script>
  19.   <!-- Event snippet for Purchases conversion page -->
  20.   <script>gtag('event', 'conversion', {'send_to': '{{ this.get("config").CSI.CustomScripts.googleTag }}/o7SKCLzd55QYEOCShJgD', 'transaction_id': ''});</script>
  21.   <!-- End Google tag (gtag.js) -->
  22. {% endif %}