Mirza

Adding Google Analytics to admin panel

Recommended Posts

Hi All,

Is it possible to add GA scripts to admin panel pages, so that we can track all the users login/logout and each(edit) page duration per user using GA scripts.

Please let me know your suggestions.

Thanks in advance.

Share this post


Link to post
Share on other sites
10 hours ago, DaveP said:

This might do it 

 

If you're running AdminOnSteroids I think you can do it there as well.

  • Like 2

Share this post


Link to post
Share on other sites

Thanks @DaveP @Pixrael @adrian for your answers.

Immediate after login I need to execute a javascript, but that didn't happened with admin custom files module or I am not adding the correct Process currently added ProcessLogin But it is not triggering.

worst part is when i click logout, its adding the login script.

Any help will be appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By alexhowl
      When I try to load one of the modals in the PW Admin panel, say Insert Link or Crop Image, the modal is blank, and I'm registering a "Load denied by X-Frame-Options" in my console. This option used to work, but I've since ported to a different server and it stopped working.
      I've tried adding this to my .htaccess file, with no results.
      Header set X-Frame-Options "ALLOW-FROM http://[my_server_ip]" I also tried commenting out the 'Header always append" line there as well (which I don't really want to do).
      I'm assuming it might, but could this have anything to do with the fact that my HTTPS is self-signed and not really configuring?
      I'm not at production stage so I'm still futzing around on the server, and moved onto web development and was going to fix my TLS later. Maybe I should fix it now? That's what i'm going to try. Let me know if you have any other ideas.
    • By johppann
      I am new to PW and have a client who use it for their website. I am trying to figure out where do I place the GA code and Ad Roll code in PW? Any help would be appreciated.
       
      Thanks,
      John
    • By topada
      I need your advice!
      I recently launched my fathers site http://www.skulptour.eu which has a booking form on this page http://www.skulptour.eu/will-kommen/buchung/
      The form is validated with the jQuery Validation Plugin and fires an ajax call for the booking-form-process.php (which sends the an notification e-mail to my dad) inside the submit handler of the plugin.
      Here is the code to demonstrate the structure
      /* * * contact-form.js * */ $(document).ready(function(){ //form var booking_form = $('#booking-form'); var booking_form_success = $("#booking-form-success"); //add workshop validation rule jQuery.validator.addMethod( "isworkshop", function(value, element) { return /^(W(O|E)|S)\s?\-?14\s?\-?\d{2}\s*?$/i.test(value); }, "Geben Sie eine Workshop-Kennnung ein. Beispiel: WO-1420 oder S-1421" ); //validate form booking_form.validate( { rules: { / .... / }, messages: { / .... / } }, highlight: function(element) { $(element).closest('.control-group').removeClass('has-success').addClass('has-error'); }, success: function(element) { $(element).closest('.control-group').removeClass('has-error').addClass('has-success'); $(element).closest('.error').remove(); },                 submitHandler: function() { console.log("submitHandler: call ajax"); $.ajax({ url:'/site/mail/booking-form-process.php', data: booking_form.serialize(), type:'POST', success:function(booking_form) {                                       console.log("submit Handler: ajax: sucess");       $("#booking-form").hide();       $("#booking-form-success").fadeIn(500,1); }, error:function(data) {       $("#error").show().fadeOut(5000); } }); // ajax } // submitHandler       }); // validate (jQuery Plugin) }); //doc ready Now i'd like to add a custom google analytics event tracker, which fires only if the ajax call is successfully executed.
      i already tried to add the following lines right after submitHandler: function () {
      //google analytics event console.log("submitHandler: google analytics call event"); ga('send', 'event', 'buchung', 'click', 'workshoptyp', 1); but it won't work. unfortunately i've no experience with the google analytics events yet and i updated my Analytics Account to use the new Universal.js, which itself is implemented properly.
      Do you guys have any ideas, how to solve this?
      Pseudocode: Booking Form > Validation w/ Errors > Ajax Call (Some php) > Ajax Call Successful > Fire Google Analytics Tracker
      Thanks in advance!
      - topada
    • By mike77
      I'm starting new project for a first time with PW. I'd like to know if it would be apprioprate (in terms of PW's creator permission) to brand the admin panel with clients logo just to make the look of it more relevant to the clients CI. The PW logo would stay where it is now but I thought of adding one next to it or something.
      Is it technically possible?