When managing code with Adobe Launch, it’s critical to be able to test changes before publishing. To make sure changes work as expected in a production environment, it’s helpful change the Launch library, allowing you to see how your dev or stage library will work on your production site. There are some great tools like Launch Switch available from Search Discovery (available here). The downside is that these tools are only available on Google Chrome. That means you can’t test on other browsers like Safari, IE, Firefox, or others.
Charles is powerful software that can monitor and manipulate all of the internet activity of your computer. Using this functionality, we can change the content of your sites pages on your computer on the fly to request different Launch libraries, allowing you to test any library on your production site. Unless you are a developer wizard, Charles can be difficult to learn, so here are step-by-step instructions.
- Get Charles Proxy
- Download Charles: https://www.charlesproxy.com/download/
- Run Charles
- Install the Charles Root Certificate
- Navigate to Help > SSL Proxying > Install Charles Root Certificate
- Open the certificate:
- Update trust settings to Always Trust:
- Add the site for SSL Proxying
- Navigate to Proxy > SSL Proxying Settings…
- Check Enable SSL Proxying
- Click Add under Include
- Add the host you wish to change and click OK
- Click OK:
- Rewrite the Launch library request in the site code
- Select Tools > Rewrite
- Check Enable Rewrite
- Rename the set and click Add under Location
- Add locations you want to change and click OK. You can use wild cards to specify multiple pages or the whole site:
- Click Add under Type/Action to add the change to the Launch code.
- Set Type to Body
- Set Where to Response
- Open Launch and find the code snippet of the production environment. Copy the URL between the quotation marks:
- Paste to the Value field under Match
- Return to Launch and find the code snippet of the library you want to use. Copy the URL between the quotation marks from the code snippet
- Paste to the Value field under Replace and select Replace all
- Click OK:
- Validate the change to the Launch code
- Open the browser of your choice, navigate to the site you modified and inspect the source code for the page
- Find the Launch code and verify that the library has changed
Now that you’ve mastered this Charles rewrite use case, you can apply it across your site to solve a variety of troubleshooting challenges.
Leave a Reply