Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

IQSS/8263-Fix Google analytics button tracking #8274

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Dec 3, 2021

What this PR does / why we need it:
The change in the reverted commit tried to make an element selector in the analytics-code.html file more precise. Unfortunately, the sub-element chosen only appears in some of the views that have the buttons that should be tracked, so the change stopped tracking of those buttons (the download menus in the file table - only the editFilesFragment tracking worked, tracking in the filesFragment broke with this change).

The only change in this PR is to revert the commit that made this change: Changed selector in analytics exmaple (sic) to be more precise [#6725], commit 1e5951f.

Which issue(s) this PR closes:

Closes #8263

Special notes for your reviewer:

Suggestions on how to test this: @kcondon discovered this via a null pointer error reported in the java console. With the updated anayltics-code.html configured, that error should be gone when a download button is clicked in the view mode for a dataset. One could also check Google for the actual button click event (which, if it doesn't appear might indicate other issues with analytics reporting).

Does this PR introduce a user interface change? If mockups are available, please link/include them here: no

Is there a release notes update needed for this change?: - The fact that Google analytics wasn't catching download button events for view mode - what you'd expect for published dataset versions - might be relevant, but I don't know that many people were using that (not actually sure, but there haven't been any (?) questions about it.)

Additional documentation:

@kcondon kcondon self-assigned this Dec 6, 2021
@kcondon
Copy link
Contributor

kcondon commented Dec 6, 2021

I think one piece that is confusing is that the top download button, not the inline download button was working so perhaps was masking the broken inline download functionality. We do use it in production (it is enabled and I can view the events) but not sure whether we are actively reporting on it. Once tested, I'll reopen the original issue. Thanks!

@qqmyers
Copy link
Member Author

qqmyers commented Dec 6, 2021

FWIW: Yes - the issue is in detecting which row/file you're downloading so it only affected the download kebabs

@kcondon kcondon merged commit 60967c3 into IQSS:develop Dec 6, 2021
@kcondon
Copy link
Contributor

kcondon commented Dec 6, 2021

Opened #8280 to track inline download issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analytics: Button tracking broken in some cases
4 participants