Created
December 9, 2015 20:53
-
-
Save jasonferrier/878861cb89bd84b4bbda to your computer and use it in GitHub Desktop.
Chrome Extension: base64 decode query string data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This is the beginnings of a Chrome Extension that will extend the Chrome Developer Tools Network panel using | |
| * the webRequest and devTools APIs. | |
| * This will be very useful for debugging the calls that the Mixpanel snippet makes out when you make | |
| * Mixpanel API calls in your code | |
| */ | |
| function d64json(data){console.info(JSON.stringify(JSON.parse(atob(data)),null,2));} | |
| /* | |
| * Then call the d64json function with your pasted in data from a Mixpanel call from the query string parameter named `data` | |
| * | |
| * d64json("eyIkc2V0IjogeyIkb3MiOiAiTWFjIE9TIFgiLCIkYnJvd3NlciI6ICJDaHJvbWUiLCIkYnJvd3Nlcl92ZXJzaW9uIjogNDcsIiRpbml0aWFsX3JlZmVycmVyIjogIiRkaXJlY3QiLCIkaW5pdGlhbF9yZWZlcnJpbmdfZG9tYWluIjogIiRkaXJlY3QiLCJwcm9kdWN0IjogIkJ1c2luZXNzX1F1YXJ0ZXJseV8xIiwiJGVtYWlsIjogImphc29uKzIwMTUxMjA5KzExMjFAZ2xpZmZ5LmNvbSJ9LCIkdG9rZW4iOiAiZTdhZTg3MjZlYzliZjIyODhlMDA3ODczOTY0OWVhOWYiLCIkZGlzdGluY3RfaWQiOiA5MDAxMn0="); | |
| * | |
| * Results in: | |
| * { | |
| * "$set": { | |
| * "$os": "Mac OS X", | |
| * "$browser": "Chrome", | |
| * "$browser_version": 47, | |
| * "$initial_referrer": "$direct", | |
| * "$initial_referring_domain": "$direct", | |
| * "product": "Business_Quarterly_1", | |
| * "$email": "[email protected]" | |
| * }, | |
| * "$token": "e7ae8726ec9bf2288e0078739649ea9f", | |
| * "$distinct_id": 90012 | |
| * } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Placed on hold for now as I have enabled debug mode for non-production with Mixpanel: