-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
When linking to LH docs, include utm parameters for analytics #4663
Comments
|
@paulirish regarding function getEnvironment() {
if (typeof window !== 'undefined') {
if (typeof InspectorMain !== 'undefined') {
return 'devtools';
}
return 'extension';
}
return 'cli';
} [Edit] |
^ small correction: |
As discussed on the eng meeting - we are going to include environment info in the build time (instead of detecting it in the runtime as I originally proposed). |
#4972 was well suited to things before we changed the whole build system. The changes broke the PR pretty badly, but hopefully made it simpler to accomplish the same task. There's a separate entry point for the extension/DevTools/LR/CLI now as well as a separate build entry point for each, which means we can easily add something to each platform's call out to the report generator (or add a |
Right now when we link to the LH docs we don't include any tracking information. For example:
https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag
We could include utm parameters to better understand how visitors arrived at the docs and why. For example:
https://developers.google.com/web/tools/lighthouse/audits/has-viewport-meta-tag?utm_source=lighthouse&utm_medium=extension&utm_content=failure
Ideally we'd use
utm_medium
to differentiate the Chrome extension from the Audits panel in Dev Tools. Not sure if the code is self-aware enough to make this distinction.Other params:
utm_source
alwayslighthouse
to indicate that we sent users there from this tool, andutm_content
to identify why users were sent to the docs (the audit failed, passed, maybe specific details about the failure reason).cc @paulirish @patrickhulce @kaycebasques
The text was updated successfully, but these errors were encountered: