emkis / gtm-event-tracker Goto Github PK
View Code? Open in Web Editor NEWA tiny, type-safe and zero-dependency solution for triggering Google Tag Manager track events.
License: MIT License
A tiny, type-safe and zero-dependency solution for triggering Google Tag Manager track events.
License: MIT License
I want to make sure I can use all the features in different ways, and that everything is working correctly.
Right now I just have Unit Testing, so integration tests are necessary.
There is no way to get the current value of a context, so this makes it harder to update its value with setProps
. If you want to update its value with the same properties you need to provide them manually or from a function return.
import { createTrackerContext } from 'gtm-event-tracker'
const trackerContext = createTrackerContext({
userId: 'no id defined',
leadId: 'kip-pqu-hrc',
})
trackerContext.setProps(previousProps => ({
...previousProps,
userId: '123',
}))
I want to know how much of the codebase is being tested, and what is the code coverage.
I want to improve the documentation of this library.
I want to create a README.md file that describes how to use this library.
I want to be able to configure Logs to change some behaviors based on my needs.
import { configure } from 'gtm-event-tracker'
configure({
logger: {
debugAll: true,
debugEvents: true,
debugContext: true,
},
})
I think it's more clear if the name of the options related to the Logger begins with "log" instead of "debug".
And would be interesting to be able to disable the push to the targetProperty
, for local development use cases.
import { configure } from 'gtm-event-tracker'
configure({
logAll: false,
logEvents: false,
logContext: false,
disableTargetPropertyPush: !isProduction,
})
LoggerOptions
opcionaistargetProperty
da configuração globalassertIsAvailable
para isTargetPropertyAvailable
targetProperty
apenas uma veztargetProperty
apenas quando chama o addEvent()
isTargetPropertyAvailable
antes de chamar o trackEvent
debug
do TrackerContextOptions
engines
pra delimitar a versão do Node.js no package.json
sideEffects
no package.json
I want the DataLayer module to be more independent. Today it depends on window.dataLayer
directly and this is not great because some users may want to push the events in a different array, or they may want to have full control over the push handler.
import { configure } from 'gtm-event-tracker'
configure({
events: {
// the default value should be window.dataLayer
targetProperty: window.myCustomDataLayer,
// a function that can modify event object before push it to the `targetProperty`
transformer: (eventProperties) => {
const formattedProps = changeObjectKeysToKebabCase(eventProperties)
return formattedProps
}
}
})
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
The npm token configured in the NPM_TOKEN
environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/
.
If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.
Please make sure to set the NPM_TOKEN
environment variable in your CI with the exact value of the npm token.
Good luck with your project ✨
Your semantic-release bot 📦🚀
I need to create labels that make sense for this project, to help me and anyone who wants to contribute
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.