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

Include platform and locale data in Typeform hidden fields #868

Open
cassidyjames opened this issue Oct 4, 2023 · 8 comments
Open

Include platform and locale data in Typeform hidden fields #868

cassidyjames opened this issue Oct 4, 2023 · 8 comments
Assignees

Comments

@cassidyjames
Copy link
Member

We often wonder what platform and locale feedback is coming from. It turns out Typeform supports hidden fields with a URL parameter-like hash, so we should be able to include this easily:

https://www.typeform.com/help/a/using-hidden-fields-360052676612/

We may want to include the app version in there while we're at it. I'm not sure if there's other automatic information we'd like to include.

@manuq
Copy link
Collaborator

manuq commented Oct 4, 2023

Sounds simple enough! I was wondering about our URL redirects, but all seems fine: If I navigate to https://endlessos.org/key-feedback-es#name=manuel&foo=bar I end up in https://endlessos.typeform.com/to/ohjef1FG#name=manuel&foo=bar

manuq added a commit that referenced this issue Oct 4, 2023
@manuq
Copy link
Collaborator

manuq commented Oct 4, 2023

I have a PR with the language and also the Kolibri version + the Endless Key version as displayed in our About modal (eg. "Manatee v6.46.0"). But still draft because I'm missing the platform. I see Kolibri perseus plugin is using navigator.platform but this document says it's outdated? https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform

@manuq manuq self-assigned this Oct 4, 2023
manuq added a commit that referenced this issue Oct 5, 2023
@manuq
Copy link
Collaborator

manuq commented Oct 5, 2023

After a second thought, we can leave platform as "Unknown" for now. The rest is working. When I try in localhost I am redirected to this URL: https://endlessos.typeform.com/to/ohjef1FG?typeform-source=localhost#language=es-419&platform=Unknown&kolibriVersion=0.16.0b1

manuq added a commit that referenced this issue Oct 5, 2023
Add current language, current project and Kolibri and Endless Key
versions as hidden fields. In the format accepted by Typeform.

Helps #868
@manuq
Copy link
Collaborator

manuq commented Oct 5, 2023

Actually, the way to go with platform is to pass "KOLIBRI_PROJECT" to the hidden fields. This is what Kolibri uses for telemetry too. For example we pass "endless-key-android" in the Android app: https://github.com/endlessm/kolibri-installer-android/blob/a575aaeeff7904eb51ee218c90f83ff585aca5f9/src/kolibri_android/kolibri_utils.py#L69

@manuq
Copy link
Collaborator

manuq commented Oct 5, 2023

The Windows app is passing 'endless-key-windows' too. https://github.com/endlessm/endless-key-app/blob/951e1555525c71499a8c1b0c044342a5b410c2bc/kolibri-electron/src/index.js#L28

@dylanmccall or @starnight can you confirm if the Flathub app is passing KOLIBRI_PROJECT as the Android and Windows apps? I couldn't find it.

@starnight
Copy link
Contributor

starnight commented Oct 6, 2023

Hmm ... Seems like the "KOLIBRI_PROJECT" environment variable has not been set in the flatpak, nor Flathub.

The _init_kolibri_env() might be a good function to place "KOLIBRI_PROJECT" environment variable.

@dbnicholson
Copy link
Member

Merged the flatpak change to set KOLIBRI_PROJECT. Moving back to in progress so it can be consumed in the explore plugin. I don't remember if we use this form on the Endless Key server or not, but that should probably set KOLIBRI_PROJECT, too.

@manuq
Copy link
Collaborator

manuq commented Oct 7, 2023

Merged the flatpak change to set KOLIBRI_PROJECT. Moving back to in progress so it can be consumed in the explore plugin.

This is actually still ready for review: #869

dylanmccall pushed a commit to learningequality/kolibri-installer-gnome that referenced this issue Apr 24, 2024
dylanmccall pushed a commit to learningequality/kolibri-installer-gnome that referenced this issue Apr 25, 2024
dylanmccall pushed a commit to learningequality/kolibri-installer-gnome that referenced this issue May 4, 2024
dylanmccall pushed a commit to learningequality/kolibri-installer-gnome that referenced this issue May 23, 2024
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

No branches or pull requests

4 participants