nuxt-tm
v1.0.6
Published
Plugin for saving UTM tags in nuxt JS
Maintainers
Readme
Nuxt-TM
Nuxt 3 module for saving UTM parameters.
Features
- Track and save UTM: Easily capture UTM parameters to gain insight into traffic sources and ad performance.
- Custom UTM Tag Collection: Capture custom tags and collect additional context.
How it works | motivation
If a visitor visits a website using the Nuxt-TM module and the URL contains a UTM parameter, the module will save the UTM parameters to the storage selected in the module settings. The saved parameters can be sent to the backend or any integrated lead system. For example, when a visitor or lead submits a form, you can send this data along with the form data. This information can be especially useful for evaluating the effectiveness of advertising and other analytics.
Quick Start
- Add
nuxt-tmmodule to your project
#using YARN
yarn add --dev nuxt-tm
#using NPM
npm install --save-dev nuxt-tm- Add nuxt-tm to the modules section of nuxt.config.ts
That's it! Now your site will automatically save tags to the selected storage in the settings🥳
Settings
export default defineNuxtConfig({
modules: [
'nuxt-tm',
],
runtimeConfig: {
public: {
nuxtTM: {
driver: 'localStorage', # setting storage for UTM
custom_utm: ['my_tm'], # custm UTM params
}
}
},
devtools: { enabled: false }
})