Add a row in the dataset when clicking on a button

Hi guys,

Hope someone can help me with this task.

We are developing a website for a client, and we need a button to add the URL of the current page to a dataset.
So basically, when the user clicks on the following button, the code should get the Login Email (the primary key) from the Private MemberData dataset and create an new item on Journers dataset, where the first field would be the previous ID +1, the second field would be the Login Email pulled from PrivateMembers and the third field would be the Current Page URL.
Any change some one could help to code that?

$w.onReady( () => {
  $w("#myDataset").onReady( () => {
      .then( ( ) => {
        console.log("New item added");
      .catch( (err) => {
        let errMsg = err;

This one will add a new blank data-row into your COLLECTION/DATABASE.

Complete this code and expand and modify this code for your own needs.

thanks heaps