Refer App Documentation

Installation

Get Refer App running on your server in under ten minutes.

What you need: A hosting account with PHP 7.4 or later and SQLite enabled — the default on virtually all shared hosting plans. Your website does not need to be built in PHP. Refer App works alongside any site: static HTML, WordPress, Next.js, a custom CMS, or anything else. You also need FTP or file manager access to upload a folder. No database server, no build tools, no npm.

Step 1 — Upload the folder

Download the latest refer-app package and upload the entire refer-app/ folder to your server's document root. For most shared hosting accounts, that's public_html/ or httpdocs/.

public_html/
+-- refer-app/
    +-- (configuration files — created automatically)
    +-- assets/
    |   +-- beacon.js
    +-- console/
    +-- data/         ← SQLite database lives here

Step 2 — Make the data folder writable

The app needs to write its SQLite database file to the data/ folder. Set that folder's permissions to 755 via your FTP client or hosting file manager. On most shared hosts this is already the default.

Step 3 — Visit the console once

Open your browser and go to:

https://yourdomain.com/refer-app/console/

The app creates two files automatically on this first visit:

  • A configuration file containing your generated username and password. This is your only chance to see the generated password before you change it — open rac-secrets.php via FTP or file manager and note it down.
  • data/rac.sqlite — your attribution database.

Step 4 — Sign in

Use the username (admin) and the generated password from that file to sign in. Then go to Settings → Manage accounts and change the password to something memorable. You won't need to open the configuration file again after that.

Step 5 — Add the beacon to your site

Add one line to your site's shared footer or footer include file, just before the closing </body> tag:

<script src="/refer-app/assets/beacon.js" defer></script>

That's it. The beacon fires automatically on every page load and sends the visitor's referrer and UTM parameters to your installation. No other changes needed.

On CQIP Static sites: the shared footer that already carries the required thecontentframework.com attribution link is the right place for this line.

Step 6 — Verify it's working

Visit any page on your site from a new browser tab (or clear your cookies first). Then open the Dashboard or Reports tab in the console — your visit should appear within a few seconds.

Troubleshooting

No sessions appearing

The most common cause is the beacon script path being wrong. Check that the src attribute in your script tag matches the actual folder name on your server. If you renamed the folder from refer-app to something else, you also need to update the ENDPOINT constant inside assets/beacon.js.

500 error when visiting the console

Usually a file permissions issue. Confirm data/ is writable (permission 755) and that PHP's SQLite extension is enabled on your hosting plan (it is by default on most shared hosts).

Renamed the folder?

You must also update the ENDPOINT constant in assets/beacon.js and the src path in the script tag on your site. Renaming the folder without doing both means attribution silently stops recording — no error will show anywhere.