Allow tracking UTM parameters properly #445
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
There are multiple reasons the frontend can loose UTM parameters on a SPA frontend (redirection at init, user accepting tracking X minutes after...). So I decided to create a new library to gather those basic methods in response to #351 and #405 (comment) (and other issues for other frameworks/plugins).
Everything can be read at https://github.com/sneko/utm-synapse
This PR makes this repo now having a dependency (sorry)... but I felt it better to use a new package for this since it could be reused by others in their project (none-Vue but also none-gtag projects).
To use it the just enable the features inside the config:
Since PRs stack up (I can understand it's hard to maintain the library on your spare time) I copied all your deployment logic so my modified package is released and available through
yarn add @sneko/[email protected]
(see https://github.com/sneko/vue-gtag/tree/v1.17.2)Hope it can help!