2 Replies Latest reply on Feb 26, 2014 12:40 PM by Vinny Sosa

    Visit duration format on Google Analytics

    Xavier P

      Another GA question! So Visit Duration is an aggregate figure I take it.  I therefore divided the SUM by the SUM of Visits.

       

      You get the average visit duration that shows on GA reports, but in seconds. What is the best way to convert that in something more human like hh:mm:ss ?

        • 1. Re: Visit duration format on Google Analytics
          Xavier P

          And the answer is (with a little help from Maryll in Customer Support ) :

           

          With Average duration set to: SUM([Visit Duration])/SUM([Visits])

           

          Add the calculation below:

           

          IF INT([Average duration])%3600/60

          < 10 THEN "0" ELSE "" END + STR(ROUND(INT([Average duration])%3600/60))

           

          + "' " +

           

          IF INT([Average duration] %3600 %60)

          < 10 THEN "0" ELSE "" END + STR(ROUND(INT([Average duration]) %3600 %60)) + "'' "

           

          Voila!

          • 2. Re: Visit duration format on Google Analytics
            Vinny Sosa

            I did the following and it matches Google Analytics Exactly for me...

             

            1. Create a calculated field with the following formula: SUM([Visit Duration])/SUM([Visits])/86400

            2. Format the field as hh:mm:ss

             

            In this way, the value comes up as a number rather than a string which appears to be a bit more flexible for dashboarding purposes.

            1 of 1 people found this helpful