vue-gtm icon indicating copy to clipboard operation
vue-gtm copied to clipboard

Passing category and label instead of target and target-properties

Open nmdgent-jefverme opened this issue 2 years ago • 2 comments

Hello everyone

Is there a way to track a custom event and pass a category and label without those two values being passed as target and target-properties?

nmdgent-jefverme avatar Apr 22 '22 13:04 nmdgent-jefverme

Does not look like it 🤔

https://github.com/gtm-support/core/blob/fae0afa9b23a5870b4c23a5b27cd077b1f75b394/src/gtm-support.ts#L188-L242

I'm not even sure what this is doing 😅 because I just took over this package from vue-gtm history to maintain it.

Maybe you could provide a second optional parameter for trackEvent where you can override the keys? That way, it will not be a breaking change.

Shinigami92 avatar Apr 22 '22 14:04 Shinigami92

If you are still interested in this, you should have a look into #197 Maybe you can get some inspirations from that PR

Shinigami92 avatar May 23 '22 15:05 Shinigami92