title: How to set up my analytics code in thankyou.php page to track the goal after form submission?
body: <p>`I am using an HTML site and on contact us form, I have kept a thankyou.php page after submission of the form. And already I have created a goal in the analytics and kept destination equals to the thankyou.php URL. But the thing is,  I am unable to track the goals of the analytics. And I tried to insert the analytics code in the thankYou pages.e, I embedded javascript in the PHP page. And i tried to fill the form and hit the submit button. but still, I am getting an error like Fatal error: Call to undefined function contents().
   Let me know How can i resolve this?
  Thank you in advance for your answers :)</p>
  
  <pre><code>&lt;!-- Global site tag (gtag.js) - Google Analytics --&gt;
  &lt;script async src="https://www.googletagmanager.com/gtag/js?id=UA-9XXXXXXXX-
  1"&gt;&lt;/script&gt;
  &lt;script&gt;
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  
  gtag('config', 'UA-9XXXXXXX-1');
  &lt;/script&gt;
  </code></pre>
  
  <p>I used to create a separate js file and inserted the code in that 
  and then I embedded the js file in thankyou.php like this </p>
  
  <pre><code>&lt;?php
  
     $script = file-get-contents('javascriptFile.js');
     echo "&lt;script&gt;".$script."&lt;/script&gt;";
  
  ?&gt;
  </code></pre>
  
  <p>But when i inserted and did a submission then im getting a fatal error </p>