Friday, March 29

Author: phpInfo

Google Tag Manager

Google Tag Assistant Tutorial

If you’ve ever used Google Analytics, Google Adwords, Google Tag Manager, or any other Google’s analytics/marketing tools, chances are that you’ve at least heard of Google Tag Assistant, or, most probably, even used it. That’s no surprise because it’s a really handy debugging tool! Even though many of Analytics Mania’s readers use this Chrome’s extension, the majority of them do not reach its full potential. But that’s about to change because, in this Google Tag Assistant Tutorial, I’ll give you a bunch of tips on how to make you + Google Tag Assistant = super team. Table of Contents What is Google Tag Assistant anyway? #1. How Does Google Tag Assistant Work? #2. Google Tag Assistant Colors #3. Session Recordings #4. Tag Assistant Report #5. Google Analytics Report #6. Repla...
Google Tag Manager

How To Implement GDPR Cookie Consent Notification with Google Tag Manager

On May 25th 2018, General Data Protection Regulation (GDPR) came in effect, meaning that online businesses that get visitors from the European Union, must track visitor/user behavior and collect data more carefully, responsibly, and with consent. I will not go into details what GDPR is (there are other great blog posts out there like this one, this one or this one). Long story short, a standard This website uses cookies blah blah blah cookie consent becomes irrelevant. From now on, if you are using some tools/scripts on your website that are used to identify individuals and their data is processed by you or 3rd parties), that can be done only when a person gives consent. This also affects tracking codes that are managed in Google Tag Manager. So before you get the actual consent, all the...
Google Analytics Cross Domain Tracking with Google Tag Manager
Google Tag Manager

Google Analytics Cross Domain Tracking with Google Tag Manager

There are already plenty of resources online that explain how to implement Google Analytics Cross-domain tracking. However, it feels that the questions of this topic are still one of the most popular ones in the community (source of this statement: my gut). And that’s no surprise. Sometimes people just blindly follow guides without properly understanding WHY this or that was made. In other cases, they do understand the basic principles but are not aware that their case/project has some nuances. That’s why I decided to also chime in, join this bandwagon and give my take on how to explain Google Analytics Cross-domain tracking with Google Tag Manager. Brace yourself, this guide will be a long one (but definitely rewarding). P.S. If you’re not sure whether you should use Google Tag Manager...
Google Tag Manager

Hotjar and Google Tag Manager: The Guide

If you’re interested in tracking website visitors and seeing that data as heat maps, then Hotjar is the right tool for you. In fact, the tool doesn’t only allow you to create heat maps but also lets you view things as scroll depth, create funnels, and ask your visitor questions, and more. Since Analytics Mania’s main target is GTM users, this blog post will not be an exception and I’ll show you how Hotjar and Google Tag Manager play along. Other guides I’ve seen online, usually explain just the installation part, even though there’s much more to be discovered, like event tracking, session tagging and more. Table of Contents What is Hotjar? How to install Hotjar via Google Tag Manager? How to track page views on a single-page website with Hotjar and Google Tag Manager? How to tra...
Google Tag Manager

How to track WIX website with Google Tag Manager

WIX is one of the most popular website builders that positions itself as “easy to use” and “allows to build gorgeous websites”). Even though such builders take away a lot of flexibility from you (especially when it comes to SEO-or-GTM-related modifications), their popularity is still solid. When the owners of such websites start realizing that they also need to track what their website visitors are doing, Google Tag Manager + Google Analytics come as one of the first tools to consider. Just a bit more than a year ago (early 2018) WIX added support for Google Tag Manager (meaning that you can actually implement its code and use the tool for what it does the best, controlling marketing tags and firing them when you actually need). Nevertheless, there are still some nuances people face and ...
Google Tag Manager

Google Analytics Goals Not Working? Here’s How to Fix That

In today’s blog post, I will not rant about how important goals are in Google Analytics and that every GA setup MUST use them. If you landed on this blog post, chances are that you are already trying to implement them. Kudos for that! In Universal Analytics, sometimes goals are not working as expected. You configure and they just don’t work. Maybe a blog post you’ve read was misleading/outdated? Maybe you misunderstood a certain part of the tutorial? Maybe you’ve encountered a bug? So, if you’re now stuck and your Google Analytics goals are not working, let’s take a look at possible reasons why this happens (+ possible solutions). Table of Contents A quick refresher #1. Incorrect match-type #2. Incorrect Page Path #3. There is some random delay in RT reports after a goal is crea...
CSS Tricks

How Do You Remove Unused CSS From a Site?

Here's what I'd like you to know upfront: this is a hard problem. If you've landed here because you're hoping to be pointed at a tool you can run that tells you exactly what CSS you can delete from your project, well... there are tools out there, but I'm warning you to be very careful with them because none of them can ever tell you the complete story. I know what you want. You want to run the tool, delete what it tells you, and you have a faster site in 2.2 minutes. I'm sorry, but I'm going to disappoint you. I think you should have a healthy level of skepticism for any tool like that. None of them are exactly lying to you — they often just don't have enough information to give you results that are safe and actionable. That's not to say you can't use them or it can't be done. Let's take...
CSS Tricks, Web Tricks

Using Immer for React State Management

We make use of state to keep track of application data. States change as users interact with an application. When this happens, we need to update the state that is displayed to the user, and we do this using React’s setState. Since states are not meant to be updated directly (because React’s state has to be immutable), things can get really complicated as states become more complex. They become difficult to understand and follow. This is where Immer comes in and that’s what we’re going to look at in this post. Using Immer, states can be simplified and much easier to follow. Immer makes use of something called "draft" which you can think of as the copy of your state, but not the state itself. It’s as though Immer hit CMD+C on the state and then cmd+V’d it somewhere else where it can be sa...
Model-Based Testing in React with State Machines
CSS Tricks, Web Tricks

Model-Based Testing in React with State Machines

Testing applications is crucially important to ensuring that the code is error-free and the logic requirements are met. However, writing tests manually is tedious and prone to human bias and error. Furthermore, maintenance can be a nightmare, especially when features are added or business logic is changed. We’ll learn how model-based testing can eliminate the need to manually write integration and end-to-end tests, by automatically generating full tests that keep up-to-date with an abstract model for any app. From unit tests to integration tests, end-to-end tests, and more, there are many different testing methods that are important in the development of non-trivial software applications. They all share a common goal, but at different levels: ensure that when anyone uses the application, ...
12 Best CMS for 2019
Tech News, Web Tricks

12 Best CMS for 2019

2019 is half over, but don’t let that stop you from trying something new… specifically, a new CMS. “But Ezequiel, good buddy, I don’t have time to check out a whole new content management system. I have websites to make!”, you say, in those exact words. That’s fair, but you should be keeping an eye on the up-and comers anyway. These are the people who have the sheer brass walnuts (which are a real thing, unisex, and available to anyone with money) to go up against giants like WordPress, Joomla, and mostly WordPress. They do this with nothing but a pretty good idea, a GitHub repository, and sometimes some corporate funding of some kind, if they’re very lucky. You ignore them at your own peril. Well, maybe not peril, but these projects deserve a look. The CMS that have been selected for t...
Using requestAnimationFrame with React Hooks
CSS Tricks, Web Tricks

Using requestAnimationFrame with React Hooks

Animating with requestAnimationFrame should be easy, but if you haven’t read React’s documentation thoroughly then you will probably run into a few things that might cause you a headache. Here are three gotcha moments I learned the hard way. TLDR: Pass an empty array as a second parameter for useEffect to avoid it running more than once and pass a function to your state’s setter function to make sure you always have the correct state. Also, use useRef for storing things like the timestamp and the request’s ID. useRef is not only for DOM references There are three ways to store variables within functional components: We can define a simple const or let whose value will always be reinitialized with every component re-rendering. We can use useState whose value persists across re-renderi...
Draggin and Droppin in React
CSS Tricks

Draggin and Droppin in React

The React ecosystem offers us a lot of libraries that all are focused on the interaction of drag and drop. We have react-dnd, react-beautiful-dnd, react-drag-n-drop and many more, but some of them require quite a lot of work to build even a simple drag and drop demo, and some do not provide you with more complex functionality (e.g. multiple drag and drop instances), and if they do, it becomes very complex. This is where react-sortable-hoc comes into play. ? This tutorial requires basic knowledge of React library and React hooks. This library has “HOC" in its name for a good reason. It provides higher-order components that extends a component with drag and drop functionality. Let’s walk through an implementation of its functionalities. Spinning up a project For this tutorial we are going ...
PHP

Cannot Compose an Essay – How to Create an Essay

Cannot Compose an Essay - How to Create an EssayDid you know you can't ever write an informative article in a straight line? That sounds ridiculous, doesn't it? Well, it is true. You can not compose an essay in a straight line, but it's still possible to find an excellent essay.First of all, exactly what exactly are you going to come up with? Probably something which you are enthusiastic about, or something that you have a particular curiosity about. What about it have you tried to create before? For those who have written a book, or even a magazine article, you are probably knowledgeable about the kind of sentences that you need to create. For those who haven't written some thing similar to that before, you may be wondering if you are likely to think of a few thoughts.The issue wit...
CSS Tricks, Web Tricks

Creating a Reusable Pagination Component in Vue

The idea behind most of web applications is to fetch data from the database and present it to the user in the best possible way. When we deal with data there are cases when the best possible way of presentation means creating a list. Depending on the amount of data and its content, we may decide to show all content at once (very rarely), or show only a specific part of a bigger data set (more likely). The main reason behind showing only part of the existing data is that we want to keep our applications as performant as possible and avoid loading or showing unnecessary data. If we decide to show our data in "chunks" then we need a way to navigate through that collection. The two most common ways of navigating through set of data are: The first is pagination, a technique that splits the s...
CSS Tricks

Form Validation with Vuelidate

Form validation has a reputation for being tricky to implement. In this tutorial, we’ll break things down to alleviate some of that pain. Creating nice abstractions for forms is something that Vue.js excels at and Vuelidate is personally my favorite option for validations because it doesn't require a lot of hassle. Plus, it's really flexible, so we don’t even have to do it how I’m going to cover it here. This is just a launching point. If you simply want to copy and paste my full working example, it’s at the end. Go ahead. I won’t tell. Then your time spent is definitely under an hour and more, like, two minutes amirite?! Ahh, the internet is a beautiful place. You may find you need to modify the form we're using in this post so, in that case, you can read the full thing. We’ll start wit...