Skip to content
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

Adding Google Tag Manager feature #841

Closed
karolbzik opened this issue Mar 10, 2018 · 13 comments
Closed

Adding Google Tag Manager feature #841

karolbzik opened this issue Mar 10, 2018 · 13 comments
Assignees
Labels
vs-hackathon Tasks for the Hackathon
Milestone

Comments

@karolbzik
Copy link
Collaborator

Let's add Google Tag Manager to the main template.
I prepared account with ID GTM-WGQ7T9C.

Here's official documentation for installation - https://developers.google.com/tag-manager/quickstart.

Can anyone help me with this?

@karolbzik karolbzik added this to the To Be Planned milestone Mar 10, 2018
@kjugi
Copy link
Contributor

kjugi commented Mar 12, 2018

I've dive deep into this issue and searched something like this: https://github.com/mib200/vue-gtm Don't know if this plugin worth to implement but seems to do what we want. The question is which tags and events to trigger.

I've tried to add it on local (pushed one commit with an implement on my fork) but found one problem. In REAMDE author said we must copy/paste GTM tag in our index.html and it seems to be ok but how to call the google tag id from config here? Of course, it can be some other idea to deal with it but don't find anything

@karolbzik
Copy link
Collaborator Author

@kjugi thank you for the suggestion.

From my point of view the best would be creating an integration with already predefined GTM data layer for ehanced ecommerce for Google Analytics (then we could even skip #839 issue). The shape of the data layer is explained here https://developers.google.com/tag-manager/enhanced-ecommerce.

@pkarw @filrak WDYT about https://github.com/mib200/vue-gtm and what @kjugi and I suggested?

@pkarw
Copy link
Collaborator

pkarw commented Mar 24, 2018

You should create a component for this I belive please take a look at analytics extension as a reference

@pkarw pkarw added the vs-hackathon Tasks for the Hackathon label May 10, 2018
@filrak filrak removed this from the To Be Planned milestone Nov 16, 2018
@talalus
Copy link
Collaborator

talalus commented Jan 18, 2019

I'll try on this

@talalus talalus self-assigned this Jan 18, 2019
talalus added a commit that referenced this issue Jan 27, 2019
talalus added a commit that referenced this issue Jan 27, 2019
@jorkvist
Copy link

Any update on this? Is it paused? I tried the code but it's failing for me. Something with the router that is passed that breaks i think. Would also be nice to get the correct DataLayer implemented on atleast products and category pages.

@talalus
Copy link
Collaborator

talalus commented Feb 14, 2019

I’ll continue on this in the weekend, yes sure data layer will be implemented

@jorkvist
Copy link

@talalus thanks for that and thanks for the answer! :) 👍

@anders03
Copy link

anders03 commented Mar 5, 2019

This would be a much-appreciated function for us marketing people. Would be very exciting to see GTM working on Vue-storefront

@talalus
Copy link
Collaborator

talalus commented Apr 8, 2019

merged with develop

@talalus talalus closed this as completed Apr 8, 2019
@jsxFardin
Copy link

Is there any documentation for tag manager ?

@talalus
Copy link
Collaborator

talalus commented Aug 19, 2020

@jsxFardin

  1. Google Enhanced Ecommerce docs: https://developers.google.com/tag-manager/enhanced-ecommerce
  2. Vue-gtm docs https://github.com/mib200/vue-gtm
    You can find current tracked events here

@jsxFardin
Copy link

@talalus
I set the googleTagManager id in local.json. but still not working.
"googleTagManager": { "id": "GTM-NXN59JK", "debug": true, "product_attributes": [ "name", "id", "sku", { "priceInclTax": "price" }, { "qty": "quantity" } ] },

@talalus
Copy link
Collaborator

talalus commented Aug 28, 2020

@jsxFardin The GoogleTagManagerModule is not registered by default so you need to:

  1. import it in https://github.com/DivanteLtd/vue-storefront/blob/master/src/modules/client.ts#L13
  2. register it in https://github.com/DivanteLtd/vue-storefront/blob/master/src/modules/client.ts#L37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vs-hackathon Tasks for the Hackathon
Projects
None yet
Development

No branches or pull requests

9 participants