Track page view on Wix

Hi all,

I got a website running via Wix and I’m trying to simply track a page view on the home page. The code for the home page looks as follows:

import { newTracker, trackPageView } from '@snowplow/browser-tracker'
newTracker('dm-sp', 'My load balancer on AWS', { 
	appId: 'dm-home', 
	plugins: [ ],

$w.onReady(function () {
	// Write your JavaScript here
	// To select an element by ID use: $w("#elementID")

	// Click "Preview" to run your code

I tried putting the “newTracker” and “trackPageView()” in and outside the “$w.onReady”, but it seems nothing gets send to the load balancer at all. Also, no snowplow activity seems to happen in the browser when checking in dev mode in chrome. I got the browser tracker imported in Wix. So that should not be the problem. Also, my whole snowplow pipeline works when I track a page view on a local html file.

Does anybody have any idea what I’m doing wrong?