Is it possible to pass URL Parameters to an embedded Pickaxe using javascript? This way the Pickaxe could already “know” who the user is and pass this via a webhook action.
@malphursgroup I don’t think this is possible yet
This is not currently possible as far as I’m aware. I remember @nathaniel talking about wanting to do this.
We have this now!
Here’s how to do it.
You’ll have to use a script embed (no iframe). Then, you’ll need to add another script section, which assigns a dict value to PickaxeConfig within the dom of the page. Like so:
<script>
window.PickaxeConfig = {
param1: "Hello World",
param2: "Goodbye World",
};
</script>
<script src="https://studio.pickaxe.co/api/embed/bundle.js" defer></script>
When you run an action, you can access these values like this:
import json
import os
values = json.loads(os.environ["PICKAXE_FRONTEND_PICKAXE_CONFIG"])
values
will contain a dictionary containing your values. You can use the action to read them back, or do other things with them!
1 Like
@malphursgroup check this out