Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Google Analytics integration #2344

Closed
mariapraetzellis opened this issue Jan 9, 2020 · 18 comments
Closed

Google Analytics integration #2344

mariapraetzellis opened this issue Jan 9, 2020 · 18 comments
Assignees
Labels
dashboard effort-medium 1/2 to 1 day of dev time

Comments

@mariapraetzellis
Copy link

We have received many requests for further usage statistics. Many of these requests have been tracked in #1745 For example:
No. of sessions
Average time in session / editing
No. of times working on one DMP

Adding a feature to enable organizational level Google Analytics would allow for an easy way to track usage data.

The organizational admin would need to be able to enable google analytics on the Roadmap web application by adding their GA tracking code. The user would then have access to the stats via the GA application and it would be the responsibility on universities to analyze the results and create the required reports.

@sjDCC
Copy link
Contributor

sjDCC commented Apr 7, 2020

Agree to assign a day to try

@mariapraetzellis
Copy link
Author

@raycarrick-ed will look into this and determine if it is feasible

@raycarrick-ed raycarrick-ed self-assigned this Apr 7, 2020
@mariapraetzellis
Copy link
Author

mariapraetzellis commented May 11, 2020

The UCOP tracking code for GA testing is (see slack). Let me know if you need anything else @raycarrick-ed

@raycarrick-ed
Copy link
Contributor

Here and below are a bunch of images to try and help figure out how to get the client side of things working.
The first 3 images, I think, show that it works both as root and client. These images are:
1_GA_root: this is with our code in as the root code so it captures everything and you can see there is live activity showing there. This is just on the home page of Google Analytics.
2_GA_Client: this is with our code in a client UoE and UCOP in as root. This is to show that with the code as the client code it still shows live activity.
3_Client_NoGA: this is with me changing to University of Manchester who have no code set up and so it shows no activity. You can see the last page that registers is changing org on the profile and then nothing more whatever I do.

So these seem to be behaving ok.

Now to the setup. The setup is pretty straightforward. I've not changed anything much. So we have one account, one property in that account which is dmponline-dev.dcc.ac.uk and then one view on that which just shows all activity. Looking at the settings, the only thing I can see that could be set up wrong would the url which is set under the property settings and the view settings. I have it set to dmponline-dev.dcc.ac.uk
So you need a new property in the account and a view defined for all activity and that's it.

If that doesn't help maybe we'll need to look at it jointly and do some screen sharing to try to figure it out. Remember to set your org as UCOP too.

1_GA_root
2_GA_Client
3_Client_NoGA
4_GA_Setup1
5_GA_Setup2

@sjDCC
Copy link
Contributor

sjDCC commented May 13, 2020

Hi @raycarrick-ed screengrabs looks good, thanks. I've played around in GA too and changed my DMPonline profile to UCOP but I don't see how to see this subset. I just see Manchester in the dropdown as in screengrab 3. Perhaps do a walkthrough for me and Magdalena sometime?

Can I confirm that once an organisation adds a google analytics tracking code, this provides them access to full site statistics. It doesn't break down usage by org, just allows them to access analytics for all of DMPonline?

Have we decided the process on adding these tracking codes. Can the user do that directly on the org details page in a similar vein to what Internet Archive allowed
Image from iOS

Should this ticket move to review or UAT now?

@raycarrick-ed
Copy link
Contributor

Yeah, need to explain this a bit better!
There are 2 views of the activity on DMPonline: a "root" view which tracks all activity by everyone so that's for whoever is running the site (us in this case) then if the user belongs to an org which has a tracker defined that will get set as well. So we see all activity and the client org sees just the activity of their users.
At the moment I have it running off a YAML file for configuration. I'm in the process of changing that to go into the DB and then I'll need to add in the ability for SuperAdmin to set which code to use as the "root" code and allow OrgAdmins to set their own tracker codes.
also need to figure out why UCOP aren't seeing their own activity and test with Glasgow.
So a wee bit more to do before it's finished.

@sjDCC
Copy link
Contributor

sjDCC commented May 13, 2020 via email

@mariapraetzellis
Copy link
Author

mariapraetzellis commented May 13, 2020

I'm able to view the UCOP account. Here is a screenshot of what we see
Screen Shot 2020-05-13 at 3 36 31 PM

And here, it correctly saw my live activity:
Screen Shot 2020-05-13 at 3 40 34 PM

However, I went into dmponline-dev.dcc.ac.uk/, created a new account for the University of York to see if my activity under this profile would show up under the UCOP Google Analytics account and it does. So it seems like the configuration is not allowing for account level analytics. This might just be a limitation of Google Analytics? @raycarrick-ed

Here's what the UCOP account sees when I'm logged in as the University of York:
Screen Shot 2020-05-13 at 3 49 58 PM

@raycarrick-ed
Copy link
Contributor

Yeah. My bad. Apologies.

@mariapraetzellis
I had been changing the configuration to get the different screen shots I added to this ticket earlier and I'd left it with UCOP getting ALL activity. So the above is correct.
I've changed it now so that we are the root and UCOP is a client so you should only see UCOP now and not University of York.

@sjDCC
this also accounts for the fact that when you were using it as UCOP you didn't see anything. But you should now.

It should now be:

  • all activity to DCC
  • only UCOP to UCOP

@sjDCC
Copy link
Contributor

sjDCC commented Jun 4, 2020

I see the tracker code box for google analytics on the org profile page and it seems to display the correct data when I test this for DCC Google
Capture

@mariapraetzellis
Copy link
Author

I'm not seeing activity for the UCOP account in GA. This is a tough one to QA, if it's okay w/ you @raycarrick-ed maybe we can set up a quick meeting where we go through it together? I want to be sure orgs see their usage data & other orgs data doesn't get mixed in. When I just tested it I didn't see any activity under the Real Time data reports.

@raycarrick-ed
Copy link
Contributor

Yes, this is a little tricky to test. We can sort out a time to look at it further but first just to double check ...

I tried changing the trackers around so that UCOP was the root and UoE was the client and I could see realtime activity. Just to check the client/root was working ok.

The tracker we are using is "UA-30638119-20"

At the moment, this is only installed on dmponline-dev.dcc.ac.uk

Anything beyond that we probably need to do some screen sharing for! Could do 4.30/8.30 Monday is that's any good or after the meeting Wednesday.

@sjDCC
Copy link
Contributor

sjDCC commented Jun 10, 2020

Tested on call and all working well. Need to check Glasgow also knew how to setup GA tracker code and correct properties view in Analytics to see data. Perhaps @magdalenadrafiova and I can test with matt and then close out?

@magdalenadrafiova
Copy link

when @raycarrick provides the guidance and cc's myself and @sjDCC into the email we can arrange a call with Matt to go through this

@raycarrick-ed
Copy link
Contributor

I've written a page on the roadmap wiki on this. It's at:

https://github.com/DMPRoadmap/roadmap/wiki/Setting-up-Google-Analytics

and also added to the Table of Contents in the sidebar.
Remember this is only set up on -dev for now. It'll come to live once we update the release.

@magdalenadrafiova
Copy link

@raycarrick thank you so much putting this together. I am going through the instructions and it reads well, I just wanted to clarify few things:

1, you need to create a new property for the roadmap website using the URL of the website - so this is something that for our service delivery you/sam/marta will be able to do?

2, you need a view. Initially, it's best to create a view which captures all data - is this something that is created within the google analytics page?

3, you need to add the tracker code to roadmap.
Again for our service delivery is this something you, marta or sam could do? does it take a long time if requested?

@sjDCC
Copy link
Contributor

sjDCC commented Jun 12, 2020

Hi @magdalenadrafiova

The property is a setting on Google Analytics which the uni does to add our website / tool. Likewise the view is in GA.

The tracker code is a box on the org admin page where the admins can insert this themselves.

Perhaps we should add a couple of screengrabs to the instructions to make that clear?

@magdalenadrafiova
Copy link

I think couple of screen grabs will be great - is this then something we will be sharing with Matt?

@briri briri closed this as completed Jun 15, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
dashboard effort-medium 1/2 to 1 day of dev time
Projects
None yet
Development

No branches or pull requests

5 participants