-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request/question: trackEvent
predefined properties
#12
Comments
Hi @lukasaric, This module is a wrapper of @gtm-support/vue-gtm, may be you can ask this feature to the author. But, I think you can extend the type export interface TrackEventOptions {
[key: string]: any;
event?: string;
category?: any;
action?: any;
label?: any;
value?: any;
noninteraction?: boolean;
} |
Hey! Well, I’s not problem with the types, they are fine (you can add additional custom props). Problem is that even if you add them, these predefined prop values will be still persisted. gtm.trackEvent({ custom: 'test' })
// object in data layer will be: { custom: 'test', event: null, value: null …. } But thanks anyways, I think I should ask gtm support for this since as you said, this is only a wrapper. Here's the reason why are there prefined values: https://github.com/gtm-support/core/blob/1ddebc22ade4dc0367a885630bb5689364f7456f/src/gtm-support.ts#L213C13-L213C13 |
@LouisMazel raised a feature request and PR on the gtm-support/core: After it gets merged and version bumped, then you can bump the version here too! Thanks |
@LouisMazel |
@michael-bouvy Can you update the dependency and release? |
@LouisMazel Technically, we don't need to update the dependency (since it's not fixed version => |
@LouisMazel @michael-bouvy
Currently when I try to use
gtm.trackEvent
it has some prefined props (event, value etc) already set.Is there a way to omit all the predefined props and just use the custom ones? (I want to have object that ends up in the
datalayer
completely purified from those predefined values)If no, is there a possibility to add this as a feature?
The text was updated successfully, but these errors were encountered: