Test your setup
If WebCM is up and running and your website is proxied correctly, accessing http://localhost:1337
will load a version of your website that will include a minimal WebCM script depending on the tools you've configured in webcm.config.ts
. In order to test if WebCM was injected correctly into your page, you can:
- Search for
webcm
in the Page Source - if you can't find it, there's a chance:- You're accessing your website directly and not via the proxy URL
- You didn't set your website as the target in
webcm.config.ts
- Try to run
webcm.track('event', { name: 'cheese', something: 'brie' })
from the browser's console and check the network tab for a/track
request - If you're loading the demo component, you should see
/system
network requests onmousemove
,mousedown
,mouseup
,scroll
and logs on the server for each/system
request - If you're loading the demo component with ecommerce enabled, run
webcm.track('ecommerce', {name: "Purchase", data: { revenue: '123.99' }})
from the browser's console and you should see a log starting with 'Ka-ching! 💰' on the server