GithubHelp home page GithubHelp logo

alt-tag-manager's Introduction

Alternative code-based tag manager

Script to help organizing visitor tracking in my websites without using a Tag Manager.

Wiki with documentation

Why?

It's an experiment and:

  • It’s lightweight. The web pages load faster and spend less battery and resources. An empty tag manager:
    • GTM has 102KB, 40KB tranfered.
    • Matomo TM has 27.6KB, 10KB transfered
    • This script has less than 3KB.
  • The tag manager itself does not share any information with any company.
  • The tag manager itself isn't blocked by ad blockers or the Brave browser.
  • Can create tags with the main and an alternative version if the user doesn't accept cookies.
  • It allows more complex triggers. This is particularly useful to better manage tags together with cookie consent
  • I can add triggers and tags either from one ot more JavaScript files or from a web page / template, also using a Wordpress content block.
  • Can use Google Analytics events to trigger other non-GA tags.

How does it work?

When something is pushed to the dataLayer it checks all the tags and fire those that match. It has triggers that can watch anything that happens in a page. It also has variables, can use consent mode, has logs any many other features.

Features summary

  • dataLayer - It uses the dataLayer object, so many websites already have triggers that it can use
  • Tags - Send information to one service and can be fired by one or more triggers.
  • Triggers - Watch something that happens in a page (including page loading) and fire one or more tags. With this tag manager you can control exactly what information is sent to the tags.
  • Variables - Get values about the web page, website, the user's browser or the current date/time.
  • Last parameters - Keeps track of the last values sent by dataLayer objects. Last params can also be used in triggers to perform math operations and/or fire tags that when a sequence of triggers happen.
  • Consent functions - Help to integrate the tag manager with cookie or tracking consent dialogs.
  • Many logs:
    • Logs - Manual records of tags that have fired or triggers.
    • Run logs - Already processed dataLayer objects
    • Debug mode - When enabled outputs stuff to the developer console.
    • Inspect dataLayer - All triggers output something to the dataLayer. You can inspect it to check what events have happened in the page.
  • Create tags with image pixels - Image pixels don't add 3rd party JavaScript that can collect more data on your users.
  • Create tags with cookieless image pixels - Prevents an image pixel from adding a cookie in your user's browser.
  • Tags that inject html in your pages
  • Default triggers:
    • Dom ready
    • Window loaded
    • Hash changed
  • Recommended triggers:
    • Consent updated

alt-tag-manager's People

Contributors

osvik avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ressmann

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.