Free translation of the spanish article from Hugo Avila (september 2nd 2017) : Google Tag Manager en Gantry5
Do you use the Google tracking tools on your websites? If you do not do so now, you are missing out on valuable statistics on the use and behavior of your page visitors. Needless to say the benefits you can get when analyzing the data and take measures to improve conversions, among other advantages.
To accomplish this task you could add a lot of Javascript code with the necessary triggers in the key elements like purchase buttons, contact links, etc. Commonly it is the tracking of the elements that call for action (CTA).
But if you do not want to complicate, you can use the tag management system (Google Tag Manager), with which you can create the triggers (or activators) and tags that allow you to track, mainly through Google Analytics, it is also useful for deeper tracking of Adwords and other campaigns.
As you can see in the GTM documentation , it requires you to enter the tracking code, part of the code goes inside the <head>
, the rest must be entered just after opening the <body>
tag.
After all this preamble, we will come to the subject of this article, as Hugo Avila, alias hugoaf, introduce this code when his Joomla template uses the framework Gantry5 , well here he has the solution, you only need to install our atom type particle to the widget and activate it in the administrator.
- Download the Github repository code .
- Insert this code into the
/templates/my-template/custom/particles/
- Open the Gantry5 manager, select the Base Outline, go to the Page Settings tab and drag and drop the Google Tag Manager atom on the bottom.
- Open the atom to configure it and add the GTM-XXXXXXX container ID. Do not forget to save your changes.
- To test its performance I recommend the Tag Assistand plugin for the Google Chrome browser plugin for the Google Chrome browser .
That's it, now you just have to open your GTM manager and create as many triggers and tags as you like.