Closed switzersc-usds closed 2 years ago
We can probably identify the questions we want to ask / metrics to capture during/before sprint grooming.
Using the Digital Analytics Platform (DAP) will link the site to analytics.usa.gov. It is a unified GA account for government agencies.
GH: https://github.com/18F/analytics.usa.gov
@glennettec will own documenting what we need to do and how long it takes for getting on DAP.
Prioritizing this as a way to understand usage and also serve the purpose of some basic uptime and front-end monitoring (eg if there are zero users for over a certain period of time, something may be up and we should investigate).
We have next steps here and will proceed after we get the URL and cert sorted out.
Below is the DAP GA code that should be placed at the top of
tag.<script async type="text/javascript" id="_fed_an_ua_tag" src="https://dap.digitalgov.gov/Universal-Federated-Analytics- Min.js?agency=DOI&sitetopic=cejst&enhlink=true"></script>
Based on the conservation today with @glennettec and seeing the GA dashboard, a few things I learned:
Next steps:
Open to any other ideas as well.
Sent email requesting access to GA dashboard for DOI..... fingers crossed!
This pdf explains two ways to install the GA code snippet. One interesting bit of info that opposes earlier findings... "The best location of the script block is directly before the closing tag" - page 2 of the manual. This is where React Helmet places the script tag. It seems that we actually get to choose which agency the screening tool analytics belongs under. Breaking down the GA link:
"https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=DOI&sitetopic=cejst&enhlink=true"
url
https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js
1st query param:
?agency=DOI &
2nd query param:
sitetopic=cejst &
3rd query param:
enhlink=true
The first query string of the src URL in the GA code snippet makes sense to me, agency=DOI. (Thanks @glennettec). We set that and this does work in the dashboard.
Investigating sitetopic and enhlink as to their purpose meaning and/or relevance.
I wonder if enhlink causes the other GA link to show up in the head?
<script type="text/javascript" async="" src="https://www.google-analytics.com/plugins/ua/linkid.js"></script>
Page 11 breaks down the query strings nicely!
What's interesting is that the enhlink doesn't seem to be supported by GA. What was the reasoning behind including that in the code snippet @glennettec ? More of a curiosity thing as I don't think it's related to the other pages not showing up on the GA dashboard.
Updating with email conversation with DAP customer support:
Thank you.
I have reached out to my colleague to get a screen shot. In the meantime, would it be possible to grant me access to the “Govt wide main reporting” in DAP?
I remember being on this exact site with my colleague with the only difference being that instead of “Govt wide main reporting”, we were looking under the DOI agency. This agency query string is also set in our script tag (sent in original email).
Yes this site belongs to EOP / OMB. That’s the org I’m with. I’m working under Lisa Chung (Engineering Director of USDS)
RE: Firing twice (great catch by the way!)
When I place the following script in the HEAD via (React Helmet)…
<script async type="text/javascript" id="_fed_an_ua_tag" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=DOI&sitetopic=cejst&enhlink=true">
for some reason the following two script tags are added (along with the above for a total of 3 script tags in the HEAD):
When I remove the enhlink query strings like so… <script async type="text/javascript" id="_fed_an_ua_tag" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=DOI&sitetopic=cejst">
then only one extra script tag shows up (for a total of 2 script tags in the HEAD):
Removing agency or sitetopic from the query strings still produces the same 2 script tags in the HEAD.
I really appreciate your help. I feel I could troubleshoot this if I had access to some GA dashboard. Thanks for all your support and looking forward to hearing from you tmrw.
Vim Shah (he/him/his)
From: "Freddie (DAP)" dap@support.digitalgov.gov Reply-To: DAP dap@support.digitalgov.gov Date: Wednesday, September 22, 2021 at 2:05 PM To: "Shah, Vim K. EOP/OMB" Vimal.K.Shah@omb.eop.gov Subject: Re: Requesting access to DOI Google Analytics dashboard: request updated
Freddie (TTS Solutions Support) Sep 22, 2021, 2:05 PM EDT Hello: Thanks for your note. You've reached the GSA. We don't have access to the specific reports you reference or know if you're viewing DAP or possibly another GA account.
Follow up feedback:
Please confirm you and your colleague are accessing DAP. Please confirm here with a screenshot of your whole browser window in GA. It should look like this and say "Gov-wide Main Reporting"
Is >main site< an EOP site? Or does it belong to another site? A step in the implementation process appears to be have been missed, because your site isn't being filtered to a specific view - please clarify the umbrella agency this site belongs to, and we'll update the filters.
I see that you are firing DAP twice on your site - this duplicates your data. Please remove the second snippet firing and confirm here.
Freddie Freddie Blicher DAP Analyst Digital Analytics Program analytics.usa.gov Demonstrate your knowledge by becoming a DAP Certified Analyst! More information here. DAP v4.1 is out! If you call our code from a local server, it's time to update. More information here.
Shah, Vim K. EOP/OMB Sep 22, 2021, 12:39 PM EDT Thank you very much for your response. Thanks for your note. What is the site URL you're wishing to implement DAP on? The aforementioned script has been added to the following site: * >main site< Glennette has access the GA dashboard / reporting and according to her, it seems that the index page (title = About) does show up in the analytics. This is a good first step indicating that the script tag may have been implemented correctly. What I’m troubleshooting now:
Freddie (TTS Solutions Support) Sep 22, 2021, 9:06 AM EDT Hello: Thanks for your note. What is the site URL you're wishing to implement DAP on?
Freddie Freddie Blicher DAP Analyst Digital Analytics Program analytics.usa.gov Demonstrate your knowledge by becoming a DAP Certified Analyst! More information here. DAP v4.1 is out! If you call our code from a local server, it's time to update. More information here.
Shah, Vim K. EOP/OMB Sep 21, 2021, 6:59 PM EDT Hello, I am currently trying to integrate the following tracking code into Google Analytics for the Justice40 project. <script async type="text/javascript" id="_fed_an_ua_tag" src=">https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=DOI&sitetopic=cejst&enhlink=true<"> I am trying to figure out if the above code snippet is working correctly. I am working with Glennette and Shelby on the Justice 40 project. The code snippet partially works and we would like to increase our troubleshooting capacity. Would it be possible for me view the GA dashboard for the DOI agency? Currently Glennette is the only one with access. Thank you and looking forward to hearing back from you. Vim Shah (he/him/his) Software Engineer
Page title should be set at Climate and Economic Justice Tool | About. I wonder if the title will not be shown in the tab or if it will scroll into view. Once pages show up on GA, we can adjust the page title.
Since this is basically working and we can't further troubleshoot or add more functionality until we have a .gov domain in place, I'm going to close this for now. We also think that the robots.txt and sitemap will help (which is being done as part of the accessibility work). When we get our domain we can create a new issue if we have any problems with analytics functionality or need to modify it.
Description We need to define what analytics we want to capture from the beginning and set up an analytics tool to do so. We may get some logging and analytics out of the box with our hosting solution, but instrumenting on the client side will give us better insights on our audience and how visitors use the site. Insights will help us answer questions such as, are users in geographies with overburdened communities accessing our site? Is content in one language being accessed more than another?
Solution Identify and implement an analytics tool on the site. I advocate for using an open source, privacy-oriented tool like Matomo as opposed to Google Analytics, but we would need to sort out hosting for this.
Describe alternatives you've considered
Links to user research or other resources
Tasks
Definition of "Done"