# tealium/tags

`composer require tealium/tags`

Canonical URL: https://packagento.com/tealium/tags

## At a glance

- **Vendor**: tealium (https://packagento.com/tealium.md)
- **Latest version**: 4.1 — released 2025-09-25
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/tealium/tags and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require tealium/tags:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## README

![image](https://github.com/efrazier/integration-magento-osb/assets/3696386/0a2e3179-498c-487a-9c83-0e8376b87e28)


## Tealium Magento 2 Extension


### Introduction

Tealium's official integration for TiQ on the Magento 2 framework. This extension provides a robust implementation of minimal boilerplate code for implementing and extending universal data objects (UDOs) across various page types. Leveraging Magento's prescribed dependency injection and layout systems, the module simplifies the process of creating and extending UDOs.

Included is a script that scaffolds out boilerplate code for new UDOs. It allows you to specify UDO extensions and the pages where the new UDO should appear. Once generated, you're left with a template ready to be filled in with data-specific logic for your particular use case.

Get started understanding UDOs and data layer concepts at [Tealium Community](https://community.tealiumiq.com/t5/Getting-Started/Getting-Started-with-The-Data-Layer/ta-p/9503).

For Magento documentation, refer to [Magento DevDocs](http://devdocs.magento.com/).

### Requirements

Ensure you have the following:

- Active Tealium IQ Account
- Tealium Account ID (usually your company name)
- Tealium Profile name associated with the app
- Tealium environment (prod, qa, dev, custom)

### Installation

#### Manual Install with Ubuntu

1. **Enable Maintenance Mode:** Enable maintenance mode before installing the extension to avoid any user issues. To enable maintenance mode, run the following command:

    ```bash
    php bin/magento maintenance:enable
    ```

2. **Copy the Tealium Folder:**
   Copy the Tealium folder from GitHub to `app/code/Tealium/Tags` within your Magento folder. If `app/code/Tealium/Tags` doesn’t exist, create it.

3. **Run the Following Commands to Update Changes:**
   
    ```bash
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
    php bin/magento cache:flush
    ```

4. **Disable Maintenance Mode:** After the installation is complete, disable maintenance mode to allow users to access the site. To disable maintenance mode, run:

    ```bash
    php bin/magento maintenance:disable
    ```

### Configuration

In the admin panel under store configuration (`Stores -> Configuration -> Tealium -> Tag Management`), set the extension options. Enable the extension and define your TiQ account, profile, and environment information.





#### Basic Config Requirements

**Account, Profile, Environment**

![image](https://github.com/efrazier/integration-magento-osb/assets/3696386/574f4aea-3f34-43a6-bc14-8db3cd43f6c7)


**First Party Tracking**

If you are using a first party domain place your client domain here

![image](https://github.com/efrazier/integration-magento-osb/assets/3696386/06a139d0-3502-4a6a-b10c-93354f170a00)


**Email Hash**

![image](https://github.com/efrazier/integration-magento-osb/assets/3696386/6b4c39b2-e496-40bd-bbd1-510ddab86b13)


### Change Log
- 4.1.0 Release (Magento 2.4.8 / PHP 8.4 Update)
    - PHP code updates for compliance with PHP 8.4

- 3.2.0 Release (Magento 2.4.6 / PHP 8.1 Update)
    - FPD (First Party Domain) support
        - Optional FPD (First Party Domain) configuration. [FPD Tealium Docs](https://docs.tealium.com/iq-tag-management/administration/first-party-domains/about/)
    - Update older PHP code for compliance with PHP 8.1+
    - CSP (Content Security Policy) updates for Magento 2.4.6
        - Update the `csp_whitelist.xml` file in the extension's `etc` directory (`public_html/integration-magento/etc`).
        - Update policies ("script-src," "connect-src," and "img-src") to include your FPD domain.
    - Newsletter signup Event
    - SHA256 encryption option on customer_email UDO variable
        - Email Hashing: If set to true, SHA256() will be applied to email addresses in "customer_email" params.
    - Bug Fixes

- 3.1.0 Release
    - Update for support of Magento 2.4
    - Add tracking for user-submitted product reviews
    - Bug fixes

- 3.0.2 Release
    - Add support for Magento 2.3.3

- 3.0.1 Release
    - Add support for Magento 2.2.8, 2.3.0, and 2.3.1-2

- 2.0.0 Release
    - Updated composer.JSON
    - Updated readme
    - Releasing all previous commits

- 1.0.1 Release
    - Default UDO (utag_data JSON object in page source) deployed via Magento Extension to match Tealium iQ TMS Data Layer bundle
    - Configure account info in admin panel
    - Extend and customize UDOs

### Sharing Feedback
If you should experience any issues with this plugin, please report them as issues directly to the repository. In your submitted issue, please include which version of Magento you reference, e.g. 2.4.1. Tealium also accepts enhancement requests, if you find there are features you wish to see supported in future releases. Please use the _enhancement_ label on your submitted issue.

### License
Use of this software is subject to the terms and conditions of the license agreement contained in the file titled "LICENSE.txt".  Please read the license before downloading or using any of the files contained in this repository. By downloading or using any of these files, you are agreeing to be bound by and comply with the license agreement.

---
Copyright (C) 2012-2025, Tealium Inc.

## Recent Versions

| Version | Released |
|---|---|
| 4.1 | 2025-09-25 |
| 4.0 | 2023-10-13 |
| 3.1.0 | 2020-11-13 |
| 2.0.4 | 2018-07-26 |
| 2.0.3 | 2018-07-19 |
| 2.0.2 | 2018-07-19 |
| 2.0.1 | 2018-07-18 |
| 2.0.0 | 2018-07-13 |
| 0.8.0 | 2018-02-28 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| php | ^7.4 \|\| ^8.0 |

## Quality

Latest release (4.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 1579 | 1579 warnings (ruleset: Magento2) — 1072 auto-fixable with phpcbf |
| PHPMD | Warning | 151 | 151 rule violations (UnusedLocalVariable:42, UndefinedVariable:30, IfStatementAssignment:19, CyclomaticComplexity:17, NPathComplexity:16) |
| Cpd | Warning | 7 | 7 duplicated chunks spanning 303 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 182 | 182 | – | – |
| 2.4.8 | – | 182 | 182 | – |
| 2.4.9 | – | – | 182 | 182 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["tealium/tags"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

tealium is a Magento 2 vendor on Packagento. See https://packagento.com/tealium.md for their full catalogue.

