Google Analytics
Facebook Pixel
Google Tag Manager
Web Engage
What's Analytics in web apps?
Analyzing the user's behavior on your website by collecting the relevant data on multiple website events/pages, sending that data to analytics provider to attract your users and target relevant public.
Improve your website by knowing what sections have most user interactions, track your progress in terms of sales, target specific audience with ads.
We can also track the user interactions in steps to determine on what sections/steps users leave the site.
What do we use the data for?
What were we previously using?
Google analytics(react-ga)
Facebook Pixel(react-facebook-pixel)
Issues
> Both managed separately
> Debugging tools not too helpful
> Google analytics package for React has insufficient documentation
What are we currently using?
Google Tag Manager
A single platform to manage all analytics providers with the ease of only having to handle one integration in codebase.
Components of GTM
Tag
Trigger
A code snippet that fires on a web page.
Trigger listens to events on web page. There are pre-defined and user defined triggers.
Variables and data layer
Variables are defined on Tag manager panel and data layer is an object available on "window" when we integrate GTM in our app.
How does GTM work?
> Configure tags and triggers on GTM panel. The tags interact with analytics providers and the triggers are responsible for firing the tags.
> We push structured data on the data layer and read that data on tag manager through data layer variables.
> Event names are assigned to triggers on panel and when GTM finds those events pushed to data layer, the triggers are activated and related tags are fired.
> We can run custom code snippets on GTM too.
Analytics providers currently integrated with GTM
Google Analytics
Facebook pixel
Webengage