This is a Chrome/Edge extension that allows you to do a one-time configuration to save a desired tracking parameter you would like appended to Microsoft Learn URLs, then easily copy the URL for any Microsoft Learn page, with previous tracking parameters replaced with your desired one.
This extension is not yet available in the Chrome and Edge extension stores, so will have to be side-loaded.
- Here is a CNET article that explains how to sideload it into Chrome.
- Here is a Microsoft Learn article that explains how to side load into Edge.
To use the extension:
- Sideload the extension into Chrome or Edge
- Pin the extension to the URL bar
- Right-click the extension icon
- Input your desired tracking parameter to append (or any text for testing)
- Click Save
- Browse to any Microsoft Learn page (ex: Azure developer documentation)
- Click the extension icon (or, right-click anywhere on the page and select 'Copy URL and add tracking')
- Paste the URL somewhere and validate that it has your desired parameter appended
Test other scenarios:
- Go to a Learn page that already has a tracking parameter added and use the extension. (It should strip out the existing tracking parameter and add yours instead.)
- Input a blank parameter in the options. (It should copy the URL as-is.)
- Copy the URL from the browser bar without using the extension. (It should copy the URL as-is.)
- Change the desired tracking parameter in the input options. (It should now do the expected copy behaviors, but with the new tracking parameter.)
There are no specific permissions you have to authorize for the extension to run, but the application itself uses the following Chrome extension permissions:
- clipboardWrite - Allows the extension to put the URL into clipboard
- contextMenus - Allows the extension to add 'Copy Page URL' and 'Copy Frame URL' items to the context menu
- scripting - Allows the background service worker to access the "addToClipboard" script
- storage - Allows the extension to store extension settings in the browser storage
After clicking on the extension icon in the browser UI, or selecting the copy option in a right-click context menu, the extension obtains the URL of a currently viewed webpage or a webpage frame, optionally removes some parts of the URL, and places the URL into the clipboard. The extension does not handle the URL in any other way, and does not handle any other user data.
- v1.0: Released initial Chrome manifest v3 version.
- Submit to Chrome/Edge extension libraries.
- Allow for multiple inputs; and picker to easily toggle for which one they want.
- Add validation to not have it work on non-Learn sites.
- Strip locale during copy
Code: MIT