Home / Admin / Untitled Snippet
Duplicate Snippet

Embed Snippet on Your Site

Untitled Snippet

Antoanela Smeu
<10
Code Preview
php
<?php
<!-- Google tag (gtag.js) event - delayed navigation helper -->
<script>
  // Helper function to delay opening a URL until a gtag event is sent.
  // Call it in response to an action that should navigate to a URL.
  function gtagSendEvent(url) {
    var callback = function () {
      if (typeof url === 'string') {
        window.location = url;
      }
    };
    gtag('event', 'conversion_event_contact', {
      'event_callback': callback,
      'event_timeout': 2000,
      // <event_parameters>
    });
    return false;
  }
</script>

Comments

Add a Comment