All Collections
EN FAQ
Landing pages
4.4 Is it possible to show the user's data, which was detected by the tracker, on the landing page?
4.4 Is it possible to show the user's data, which was detected by the tracker, on the landing page?
Viktoria Petruk avatar
Written by Viktoria Petruk
Updated over a week ago

For self-hosted landing pages, you need to use the following script:

<html>
<head>
<script>
function getURLParameter(name) {
return decodeURIComponent(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
</script>
</head>
<body>
Hello <script>document.write(getURLParameter('model'))</script> Caution! Your OS version is not up-to-date enough to visit that site. Press the button to update!
</body>
</html>


You can change the text of the script.  In order for it to work correctly, you have to add the placeholder you are interested in to the landing’s link in landing page settings to pass the information on the landing page for its further placing on it (for example, the script is configured to display a user's device model, then we need to add to the end of the landing page’s link the following & model =<model> . Thus, the link will look like http://mylandingpage.com?model=<model> ). 

The script will pull the name of the parameter and display it on the landing.

For landing pages created in our editor, you will need to place the following placeholders onto the landing page: 

Did this answer your question?