This project was created in an instant with with
npx create-roku-app
. Check it out! https://github.com/haystacknews/create-roku-app
This sample project showcases how to use the library vixtech/roku-google-analytics-4
to send events to GA4 from your Roku apps. It also includes:
-
How to enable Debug Mode
-
How to send campaign data (UTM params)
Check the full details in this blogpost: https://arturocuya.com/posts/using-ga4-in-roku
-
Clone this repository and run
pnpm install
. If you're usingnpm
, deletepnpm-lock.yaml
and runnpm install
. -
Create a copy of
bsconfig.example.json
and name itbsconfig.json
. Edit it to set the password for your Roku device. -
Go to
src/source/utils/ga4.bs
and replace the string"<your-measurement-id>"
with your measurement id (starts withG-
). -
If you're using VSCode (recommended), make sure you have the BrightScript Language plugin installed. Go to the
Run & Debug
panel and launch the app from there. -
If you're not using VSCode, run
npm run build
, zip the contents ofdist/build
and sideload the app from your Roku's IP website using the browser of your preference.