How To Set Google Tag On A Button ? - Question | JoomShaper
🎃 Halloween Sale is Live! Get 35% OFF on all plans. Sale ends soon! Get Offer

How To Set Google Tag On A Button ?

jeronimo89

jeronimo89

General 3 years ago

Hy,

i would like to set some Google tag manager on a lot of button to know who come and click. I don't find a place to set this. It is nessecery to do that. Thanks for your help.

0
4 Answers
Pavel
Pavel
Accepted Answer
3 years ago #53673

Hi @jeronimo89. Add your own class in the Button Addon (CSS Class Field). And use it on the GA side to create a goal and trigger.

Google Tag Manager is just a container for any content. You must add GA code to it.

Read GTM and GA documentation

0
Ariba
Ariba
Accepted Answer
Support Agent 3 years ago #53662

Hello

Thank you for your query. My apologies, this will require customization which we cannot provide as per our Support Policy.

0
jeronimo89
jeronimo89
Accepted Answer
3 years ago #53781

Hi Pavel, thnks for your help. i must to set de code of Google tag in the CSS if i understand. And i set the class CS in the button.

0
Pavel
Pavel
Accepted Answer
3 years ago #53808

Hi @jeronimo89. Let's use the terminology correctly.

Google Tag Manager - GTM

Google Analytics - GA

CSS - code for appearance

HTML - marking of your site content. It is in HTML to insert everything that you need.

GTM installed on the site once at the global level in template. Not to the single element like button. It creates in the HTML code of your site "windows", inside which you can use any code that insert in the GTM interface (in your GTM Google accaunt).

Based on the above, you must insert the GA inside the GTM on the side of your Google accaunt.

In order to add a target to the button, you need to configure it on the Google Analytics side using class of the button that you added to the addon so that the GA javascript is able to find this button in the code of your site and track the events.

GTM is optional. It is just a comfortable feature where you can add and manage many scripts from various services. If you just need to work with GA and nothing else, do not install GTM. Just add code from GA to your template. If you use Helix you enough to insert GA ID in the settings.

0