I have been trying to write a function to check if user is authenticated and then call a google analytics script for custom report. This has been a big hassle and I believe Drupal is not that difficult. Is there anyone who can help or take up the project? It should be a simple and straight forward thing to do but being able to check user authentication has not been easy
I've tried to use a php function to check if user is logged in but I was not able to call javascript function from it.
I wrote a script function with jquery calling the script on page load but I was not able to check if user is logged in using javascript