cloudflare/webcm

Custom events how to

fabiokr opened this issue · 1 comments

I'm working on a plugin that will use client.execute for some advanced functionality. As part of that, I'd also like to track a custom event. What is the expected way to achieve this?

Would it be OK if I call webcm.track({ event: 'mycustomevent', mycustomevent: [{...}] }) as part of client.execute to achieve that?

almost there - assets.html has an example on line 18 - you just need to specify the name key of the event, and then any other fields that comprise the payload (e.g. something: 'brie')