Code Examples for Integrating Referral-API On Your Client Side
The guides below are written in React JS and Vanilla HTML-JS and show simple examples on how to integrate Referral-API NPM Package and Web Script onto your client side code to track various conversions and actions.
React - General Referral-API NPM Package Example
Check out this sandbox to see how you can use the Referral-API npm package in your React website. It's a simple demo that shows all the functions you can use with this package. It'll help you understand how to add Referral-API to your website, so you can keep track of conversions and actions easily.
This code snippet adds the rfa parameter to simulate a scenario where a user visits your website through a referral link.
Vanilla HTML-JS - General Referral-API Web-Scipt Example
Check out this sandbox to see how you can use the Referral-API web-script in vanilla JS. It's a simple demo that shows all the functions you can use with this script. It'll help you understand how to add Referral-API to your website, so you can keep track of conversions and actions easily.
This code snippet adds the rfa parameter to simulate a scenario where a user visits your website through a referral link.