By Guy-Markman: 18.4.2022
With this code you will be able to limit the amount of people who can access the link link, using your Wix website
- Create a new directory in your backend named ClickConfig, and create a file named
ClickConfig.js
. - Copy the content of
ClickConfig.js
frombackend/ClickConfig/ClickConfig.js
into it, you can edit the variables however you want that fits your needs.
From now on, if you see a name in upper screaming snake case, it refers to the a variable from ClickConfig.js
- Create a new Multiple items collection
COLLECTION
, and set its permissions toSite Content
. - Create a number field in it named
FIELD_NAME
and set it to 0,. - Create a new Wix page (you can call it whatever you want), and put the code from page.js in the code editor of this page.
- Create a text object with the style that you want and change its id to TEXT_ID.
- Create a new file in the backend and name it
updateClicks.jsw
. Copy the content from backend/updateClicks.jsw it. - Release the page and share the link to the page with whomever you want.
You can change the values in ClickConfig.js and the values in COLLECTION
to suit your needs