When you introduce GTM to Nuxt.js, all you have to do is only 3 things.
- install a module
- insert GTM's id
- testing
1. install a module
Type a command below.
npm i @nuxtjs/gtm
or
yarn add @nuxtjs/gtm
When you finish installing the module, move to next part.
2. insert GTM's id
Open a file named nuxt.config.js and insert GTM's id.
export default {
modules: [
'@nuxtjs/gtm',
],
gtm: {
id: 'GTM-XXXXXXX'
}
}
For other options, please check here.
https://github.com/nuxt-community/gtm-module#readme
3. testing
Install a add-on to chrome and test weather it is working correctly or not.
https://chrome.google.com/webstore/detail/tag-assistant-legacy-by-g/kejbdjndbnbjgmefkgdddjlbokphdefk
Writer
Takeshi Sawaki
CEO at CoDigital, inc. in Japan.
CoDigital, inc. is a Japanese Digital Marketing Agency.
γ»We primarily deal in digital marketing services such as Advertising, SEO, Social Media and introducing CRM / MA tools in Japan. γ»We work with a variety of industries such as SaaS Companies, Staffing Agencies, Website Design Company, Media and Software and App developers providing digital marketing consulting, implementation and analyzing services.
Top comments (3)
Hi. ππ»
What is this GTM using as a version? I know that there are several and not all of them are compatible.
Hello,
Are you asking for GTM version? OR Nuxt.js's version?
Yeah, asking for GTM.