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

fix: UTM mobile #10665

Merged
merged 12 commits into from
Aug 13, 2024
Merged

fix: UTM mobile #10665

merged 12 commits into from
Aug 13, 2024

Conversation

teolemon
Copy link
Member

@teolemon teolemon commented Aug 9, 2024

Screenshot

fix: UTM mobile

fix: UTM mobile
@teolemon teolemon requested a review from a team as a code owner August 9, 2024 09:18
@github-actions github-actions bot added Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. Site layout labels Aug 9, 2024
@@ -51,6 +51,7 @@
<li><a href="[% edq(lang('menu_contribute_link')) %]">[% lang('menu_contribute') %]</a></li>
<li class="divider"></li>
<li><label>[% lang("add_products") %]</label></li>
<!-- For reference: get_the_app_link_off" = /open-food-facts-mobile-app" -->
<li><a href="[% edq(lang_flavor('get_the_app_link')) %]?utm_source=off&utf_medium=web&utm_campaign=pro_platform_install_the_app_to_add_products_[% language %]">[% lang('install_the_app_to_add_products') %]</a></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li><a href="[% edq(lang_flavor('get_the_app_link')) %]?utm_source=off&utf_medium=web&utm_campaign=pro_platform_install_the_app_to_add_products_[% language %]">[% lang('install_the_app_to_add_products') %]</a></li>
<li><a href="[% edq(lang_flavor('get_the_app_link')) %]&utm_source=off&utf_medium=web&utm_campaign=pro_platform_install_the_app_to_add_products_[% language %]">[% lang('install_the_app_to_add_products') %]</a></li>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no question mark in the root URL, I believe @hangy

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_the_app_link is in po files @stephanegigandet @hangy

@teolemon teolemon linked an issue Aug 9, 2024 that may be closed by this pull request
@@ -242,13 +244,15 @@
<!-- full width banner on mobile -->

[% IF mobile %]
<a href="[% mobile.link %]?utm_source=off&utf_medium=web&utm_campaign=mobile-app-top-banner-[% language %]" id="mobile-app-top-banner" class="button large expand success">
<!-- For reference: mobile.link = https://play.google.com/store/apps/details?id=org.openfoodfacts.scanner -->
<a href="[% mobile.link %]&utm_source=off&utf_medium=web&utm_campaign=mobile-app-top-banner-[% language %]" id="mobile-app-top-banner" class="button large expand success">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail on an iphone / ipad.
One solution is to add the start of the utm fields to the url in Config_off.pm, so that mobile.link already contains utm=[off|obf...]&utm_medium=web
Same for options.ios_app_link etc.
That way we can just add ?utm_campaign in all cases

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: utf_medium

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add utm_medium and utm_source in Config_[off|obf...].pm and then only add ?utm_campaign

@github-actions github-actions bot added 🐾 Open Pet Food Facts Our pet food analysis project https://world.openpetfoodfacts.org config labels Aug 9, 2024
@github-actions github-actions bot added the 🧴 Open Beauty Facts Our cosmetic analysis project https://world.openbeautyfacts.org label Aug 9, 2024
@github-actions github-actions bot added the 📸 Open Products Facts Our project to increase the lifespan of objects. https://world.openproductsfacts.org label Aug 9, 2024
@@ -328,8 +332,11 @@ <h1 class="if-empty-dnone">[% title %]</h1>
</div>
</div>
<div class="cell small-100 medium-100 large-50 flex-grid v-align-center direction-row">
<!-- msgid "https://apps.apple.com/app/open-beauty-facts/id1122926380" -->
<a class="cell small-50 medium-25 large-25 h-space-short v-align-center" href="[% options.ios_app_link %]?utm_source=off&utf_medium=web&utm_campaign=install_the_app_ios_footer_[% language %]"><img src="[% edq(lang('ios_app_icon_url')) %]" alt="[% edq(lang('ios_app_icon_alt_text')) %]" loading="lazy" class="full-width"></a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the utm_source / medium need to be removed for ios too

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@stephanegigandet
Copy link
Contributor

/lint

@stephanegigandet
Copy link
Contributor

/update_tests_results

@teolemon teolemon enabled auto-merge (squash) August 9, 2024 18:35
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@teolemon teolemon merged commit 965041d into main Aug 13, 2024
11 of 12 checks passed
@teolemon teolemon deleted the fix-utm-mobile branch August 13, 2024 11:09
stephanegigandet pushed a commit that referenced this pull request Aug 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.41.0](v2.40.0...v2.41.0)
(2024-08-13)


### Features

* generate historical events from product revisions
([#10523](#10523))
([42508e1](42508e1))
* sync number of product public/pro in CRM
([#10684](#10684))
([026ff6a](026ff6a))


### Bug Fixes

* 3 fixes to make /products/[code1],[code2] work again
([#10669](#10669))
([7fc07fc](7fc07fc))
* Automatically unselect images when source image is deleted
([#10692](#10692))
([588897a](588897a))
* **docs:** correct OpenAPI definition by fixing missing reference
([#10659](#10659))
([4f0f10e](4f0f10e))
* gen_users_emails.pl
([#10686](#10686))
([00e4c26](00e4c26))
* Show missing nutrients in Nutri-Score panel
([#10655](#10655))
([a1b11eb](a1b11eb))
* UTM mobile
([#10665](#10665))
([965041d](965041d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config 🧴 Open Beauty Facts Our cosmetic analysis project https://world.openbeautyfacts.org 🐾 Open Pet Food Facts Our pet food analysis project https://world.openpetfoodfacts.org 📸 Open Products Facts Our project to increase the lifespan of objects. https://world.openproductsfacts.org Site layout Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests
Projects
Status: Done
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

Broken link to the app, negatively impacting conversion
3 participants