What code in js should I write when setting google goals?

  • 0
    Hello everyone.
    The website has a code in the header
    <script async src="https://www.googletagmanager.com/gtag/></script>
    <script>
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());
    
          gtag('config', '---------------');
    </script>


    The question is, what code do I need to add to the js file where the form is submitted in order to track the GA (google analitics) target with the name orderSend.
    Thank you all in advance.
    JavaScript Landen Cain, Dec 5, 2019

  • 1 Answers
  • 0
    I think google documentation has an answer to your question
    Joshua Morales

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!