-
Posts
2 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by vektren
-
-
Hey, is this still working on 7.1? I just cannot seem to get it working.
- Added the code in <script></script> tags under the advanced section for the page itself, not site-wide.
- I got the block-id's correctly from inspecting the page.
- I have added some text to the block for it to load, but nothing is replaced?
Are their variables that I need to add to the page? Or is the script (from my understanding) replacing current text in format <h3> etc... ?
I am redirecting users from Typeform, with their names, email, and order details in the URL, and just want them to have a personalised order confirmation screen.
Is it possible to create personalised pages with data taken from an appended URL?
in Customize with code
Posted
For anyone who wants to do this, I got it to work on 7.0 and 7.1. You can pass any number of URL parameters, and the script allows you to push them into a code block:
The URL I used for this: https://website.com/ordered?firstname=Jack&order=2545346&email=jack@email.com
Then on the page, you want to display the payload:
In the page editor, add a "Text" block where you want to display the URL payload.
In the text block, add the following code:
You can add/change the number of parameters by adding and removing "const parameter = urlParams.get('parameter');" within the Java Script above, and then add it to your payload under PayloadString: by adding ${parameter}.
Thanks to everyone that put me on the right path!