<script> function setParams(){ var params = { 'user_name':"<?php echo (isset($_GET['name'])) ? $_GET['name'] : ''; ?>", 'user_email':"<?php echo (isset($_GET['email'])) ? $_GET['email'] : ''; ?>", //optional 'uid':"<?php echo (isset($_GET['uid'])) ? $_GET['uid'] : ''; ?>", 'data' : [ // OPTIONAL KEY TO ADD OTHER USER ATTRIBUTES { 'key' : 'YOUR_KEY1_NAME', 'value' : 'YOUR_KEY1_VALUE' }, { 'key' : 'YOUR_KEY2_NAME', 'value' : 'YOUR_KEY2_VALUE' }, ... ] }; return params; } </script>The above example is based on PHP code but you can replace the PHP code with the code your website is developed. After pasting the code and replacing the values, call setParams function on body load. For example:
<body onload="setParams()"> </body>