Closed Bug 1544359 Opened 6 years ago Closed 6 years ago

Have Report Site Issue detect the Mobify JS library

Categories

(Web Compatibility :: Tooling & Investigations, enhancement, P1)

enhancement

Tracking

(firefox68 fixed, firefox69 fixed)

RESOLVED FIXED
Tracking Status
firefox68 --- fixed
firefox69 --- fixed

People

(Reporter: karlcow, Assigned: ksenia)

Details

Attachments

(1 file)

The goal is to make the Reporter detects automatically when Mobify is used on a Website.

This is done in the context of Web Compatibility 2019Q2 work
https://github.com/mozilla/webcompat-team-okrs/issues/79

This will require to discover the pattern for Mobify library
On the server side, it will be handled by https://github.com/webcompat/webcompat.com/issues/2845
(see previously Bug 1535479 for FastClick)

Type: defect → enhancement
Priority: -- → P2

Just found https://trends.builtwith.com/websitelist/Mobify.

Testing the first site, https://www.shaw.ca/ (which redirects to https://www.shaw.ca/store/), there is indeed a window.Mobify global:

{
  "Tag": {
    "ua": "Mozilla/5.0 (Linux; Android 7.0; SM-G892A Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/67.0.3396.87 Mobile Safari/537.36",
    "options": {
      "enabled": {
        "url": "//cdn.mobify.com/sites/shaw/production/adaptive.min.js"
      },
      "desktop": {
        "capture": false,
        "url": "//a.mobify.com/shaw/a.js"
      }
    },
    "DOMContentLoaded": 1555537815979
  },
  "points": [
    1555537815969
  ],
  "tagVersion": [
    7,
    0
  ],
  "capturing": false,
  "prefix": "x-"
}

window.Mobify should probably be sufficient, or window.Mobify && window.Mobify.Tag, if we have reason to be more paranoid.

Assignee: nobody → kberezina
Status: NEW → ASSIGNED
Priority: P2 → P1
Flags: needinfo?(kberezina)
Flags: needinfo?(kberezina)

Added the change to the reporter and also modified the JSON key to be extra_labels instead of label according to #1551721 for the POST request.

Tried testing mobify detection on https://www.shaw.ca/ on local instance/staging of webcompat.com, but none of the labels get created (not even the browser and engine). Is there a way to test labels creation locally or on staging ?

Flags: needinfo?(miket)
Flags: needinfo?(kdubost)

So from the issue, I see:

<!-- @browser: Firefox 68.0 -->
<!-- @ua_header: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0 -->
<!-- @reported_with: desktop-reporter -->

and further in the body.

<li>hasMobify: true</li>

no extra_labels was added to the body.
so this is strange. Let me answer on Bug 1551721

Flags: needinfo?(kdubost)

Fixed report site issue: added marfeel and mobify support, fixed labels being passed to the server

Attachment #9068406 - Attachment description: #1544359: support mobify and marfeel → #1544359: Fixed report site issue extension: added marfeel and mobify support, fixed labels being passed to the server
Attachment #9068406 - Attachment description: #1544359: Fixed report site issue extension: added marfeel and mobify support, fixed labels being passed to the server → Bug 1544359 - Fixed report site issue extension: added marfeel and mobify support, fixed labels being passed to the server
Pushed by twisniewski@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2f5143408ad Fixed report site issue extension: added marfeel and mobify support, fixed labels being passed to the server r=twisniewski,Gijs
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

Ryan, Could we uplift this to Android Fennec 68?

Flags: needinfo?(ryanvm)
Flags: needinfo?(miket)

If someone wants to fill out the request, we can consider it.

Flags: needinfo?(ryanvm)

Comment on attachment 9068406 [details]
Bug 1544359 - Fixed report site issue extension: added marfeel and mobify support, fixed labels being passed to the server

Beta/Release Uplift Approval Request

  • User impact if declined: This would make the fix available to current nightly users of Firefox Fennec Nightly (which is stucked in 68). The consequence would that it would help the Webcompat team to have better reporting on webcompat.com
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This doesn't introduce any modifications in the core of the product. It modifies the format of the communications which is handled server side by webcompat.com. It mainly fixes a bug we had in the previous release version which is creating partial reporting compared to what we initially intended.
  • String changes made/needed:
Attachment #9068406 - Flags: approval-mozilla-beta?

Thanks! Reading https://wiki.mozilla.org/Release_Management/Uplift_rules
Making the request and hope I did it right. Feel free to ask any clarifications.
Adding Thomas for double checking.

Flags: needinfo?(twisniewski)

LGTM, thanks Karl.

Flags: needinfo?(miket)

Comment on attachment 9068406 [details]
Bug 1544359 - Fixed report site issue extension: added marfeel and mobify support, fixed labels being passed to the server

fix for the webcompat reporter extension, which is only enabled in pre-release channels; approved for 68.0b12

Attachment #9068406 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: needinfo?(twisniewski)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: