Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-3970

Send custom page view event to Google Analytics for IGB download button

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Send custom page view events to Google Analytics for the IGB download button in bioviz.org to analyze users' operating systems.

        Attachments

          Issue Links

            Activity

            Hide
            nfreese Nowlan Freese added a comment - - edited

            I tested Mac, Windows, Linux for the IGB Download page, Available Installers page, and IGB Early Access Download page. They all appear to be working correctly.

            Tested on my Mac using Chrome with different user agents for Mac, Windows, and Linux.

            Closing ticket

            Download button clicked - mac - working, IGB Download
            Download button clicked - windows - working, IGB Download
            Download button clicked - linux - working, IGB Download

            Download button clicked - mac - working, Available Installers
            Download button clicked - windows - working, Available Installers
            Download button clicked - linux - working, Available Installers

            Early Access Download Button clicked - mac - working, IGB Early Access Download
            Early Access Download Button clicked - windows - working, IGB Early Access Download
            Early Access Download Button clicked - linux - working, IGB Early Access Download

            Show
            nfreese Nowlan Freese added a comment - - edited I tested Mac, Windows, Linux for the IGB Download page, Available Installers page, and IGB Early Access Download page. They all appear to be working correctly. Tested on my Mac using Chrome with different user agents for Mac, Windows, and Linux. Closing ticket Download button clicked - mac - working, IGB Download Download button clicked - windows - working, IGB Download Download button clicked - linux - working, IGB Download Download button clicked - mac - working, Available Installers Download button clicked - windows - working, Available Installers Download button clicked - linux - working, Available Installers Early Access Download Button clicked - mac - working, IGB Early Access Download Early Access Download Button clicked - windows - working, IGB Early Access Download Early Access Download Button clicked - linux - working, IGB Early Access Download
            Hide
            ann.loraine Ann Loraine added a comment -

            I have merged the PR and deployed the new content on BioViz.org.

            Probably we can test that it is working as expected after 24 hours have passed?

            To test:

            • Log into analytics.google.com. You should have access if you are part of the team to view account "IGB Usage" property "Bioviz.org Web site". If you do not have access, ask Dr. Loraine to be added.
            • For your reference, take a look at the new javascript file added here: https://bioviz.org/js/sendCustomDownloadGAEvent.js
            • Note that when a user clicks the current release download button or the early access release download button, a page hit should be logged in google analytics. This page hit is meant to log whenever a user clicks the Download Button and starts downloading an IGB version for their particular platform
            • If the user has clicked the current release download button, the name of the page should be "Download Button Clicked - " + osName
            • If the user has clicked an early access download button, the name of the page "Early Access Download Button Clicked - " + osName;

            Please try downloading the Windows and Mac installers by clicking the button. Note that you will have to use a Windows browser to check the Windows download and a Mac browser to check the Mac download.

            Currently, the Linux download doesn't work due to an as-yet unresolved issue - see linked tickets.

            Show
            ann.loraine Ann Loraine added a comment - I have merged the PR and deployed the new content on BioViz.org. Probably we can test that it is working as expected after 24 hours have passed? To test: Log into analytics.google.com. You should have access if you are part of the team to view account "IGB Usage" property "Bioviz.org Web site". If you do not have access, ask Dr. Loraine to be added. For your reference, take a look at the new javascript file added here: https://bioviz.org/js/sendCustomDownloadGAEvent.js Note that when a user clicks the current release download button or the early access release download button, a page hit should be logged in google analytics. This page hit is meant to log whenever a user clicks the Download Button and starts downloading an IGB version for their particular platform If the user has clicked the current release download button, the name of the page should be "Download Button Clicked - " + osName If the user has clicked an early access download button, the name of the page "Early Access Download Button Clicked - " + osName; Please try downloading the Windows and Mac installers by clicking the button. Note that you will have to use a Windows browser to check the Windows download and a Mac browser to check the Mac download. Currently, the Linux download doesn't work due to an as-yet unresolved issue - see linked tickets.
            Show
            jsirigin Jaya Sravani Sirigineedi added a comment - Raised the PR: https://bitbucket.org/lorainelab/bioviz/pull-requests/163
            Hide
            ann.loraine Ann Loraine added a comment -

            The changes make the page code cleaner in my view.
            I have not looked at how the page is rendered in a browser, but it looks like it would be fine.
            Please submit PR when ready, and I will deploy it right away on bioviz.org for final testing.

            Show
            ann.loraine Ann Loraine added a comment - The changes make the page code cleaner in my view. I have not looked at how the page is rendered in a browser, but it looks like it would be fine. Please submit PR when ready, and I will deploy it right away on bioviz.org for final testing.
            Hide
            jsirigin Jaya Sravani Sirigineedi added a comment -

            I made a few more minor changes (added if conditions and added page_path attribute as well to the GA event), these don't have any major impact but improve the code and avoid sending any unnecessary events or throwing errors. Here is the updated code: https://bitbucket.org/jaya-sravani/bioviz/branch/IGBF-3970. Tested it after the changes, working as expected. Please review once again and let me know if there are any issues.

            Show
            jsirigin Jaya Sravani Sirigineedi added a comment - I made a few more minor changes (added if conditions and added page_path attribute as well to the GA event), these don't have any major impact but improve the code and avoid sending any unnecessary events or throwing errors. Here is the updated code: https://bitbucket.org/jaya-sravani/bioviz/branch/IGBF-3970 . Tested it after the changes, working as expected. Please review once again and let me know if there are any issues.

              People

              • Assignee:
                jsirigin Jaya Sravani Sirigineedi
                Reporter:
                jsirigin Jaya Sravani Sirigineedi
              • Votes:
                0 Vote for this issue
                Watchers:
                Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: