# Installation and Update

### Product Analytics addon **[WHMCS](https://puqcloud.com/link.php?id=77)**
#####  [Order now](https://puqcloud.com/store/whmcs-addon-modules) | [Download](https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Product-Analytics/) | [FAQ](https://community.puqcloud.com/)

## System Requirements

| Requirement | Minimum |
|-------------|---------|
| **PHP** | 8.1, 8.2 or newer |
| **WHMCS** | 8.x, 9.x or newer |
| **ionCube Loader** | v13 or newer (v14, v15) |

> **Note:** The module uses ionCube encoding. Make sure ionCube Loader is installed and active on your server.

---

## Download

The module can be ordered and downloaded from PUQ Cloud:

- **Order / Download:** [https://puqcloud.com/store/whmcs-addon-modules](https://puqcloud.com/store/whmcs-addon-modules)
- **FAQ:** [https://community.puqcloud.com/](https://community.puqcloud.com/)
- **Direct download links:**

PHP 8.1:
```
wget https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Product-Analytics/php81/PUQ_WHMCS-Product-Analytics-latest.zip
```

PHP 8.2+:
```
wget https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Product-Analytics/php82/PUQ_WHMCS-Product-Analytics-latest.zip
```

> All versions are available at: [https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Product-Analytics/](https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Product-Analytics/)

After downloading, extract the archive:

```
unzip PUQ_WHMCS-Product-Analytics-latest.zip
```

---

## Installation

### Step 1: Upload Files

Extract the module archive and upload the `puq_product_analytics` directory to the WHMCS addons directory:

```
/your-whmcs/modules/addons/puq_product_analytics/
```

Directory structure after upload:

```
modules/addons/puq_product_analytics/
    puq_product_analytics.php
    hooks.php
    whmcs.json
    version
    logo.png
    lib/
        puqProductAnalytics.php
    lang/
        english.php
    templates/
        ...
```

### Step 2: Activate the Module

1. Log in to the WHMCS admin panel
2. Go to **Setup** > **Addon Modules**
3. Find **PUQ Product Analytics** in the list
4. Click **Activate**

### Step 3: Configure the License Key

1. After activation, click **Configure** next to the module
2. Enter your license key in the **License key** field
3. Select admin role groups that should have access to the module
4. Click **Save Changes**

After saving, a verification status will appear below the license key field (e.g., `success: 2027-02-15T19:41:07+01:00`).

![Module configuration with license key and access control](https://doc.puq.info/uploads/images/gallery/2026-02/embedded-image-z1rvrw4m.png)
*01-addon-config-license.png*

### Step 4: Access the Module

Go to **Addons** > **PUQ Product Analytics** to access the dashboard and all reports.

---

## Update

### Step 1: Backup

Before updating, we recommend backing up:
- Your WHMCS database
- Module files in `modules/addons/puq_product_analytics/`

### Step 2: Upload New Files

Extract the new version and overwrite all files in:

```
/your-whmcs/modules/addons/puq_product_analytics/
```

### Step 3: Verify

1. Log in to the WHMCS admin panel
2. Go to **Addons** > **PUQ Product Analytics**
3. Check the version number in the top-right corner of the navigation bar (e.g., `v1.0`)

> Re-activation is not required after updating. Simply overwrite the files and the new version is ready to use.

---

## Deactivation

1. Go to **Setup** > **Addon Modules**
2. Click **Deactivate** next to PUQ Product Analytics
3. Confirm the deactivation

> **Note:** The module does not create any custom database tables. Deactivation simply removes the module from the active addons list.

---

## License

The module requires an active license for full functionality. The license is verified through the PUQ Cloud license server.

### How License Verification Works

- The module periodically checks license validity at `https://license.puqcloud.com/`
- Verification results are cached in the database for 5 days
- If the license server is temporarily unreachable, the module uses the last cached result

### Without an Active License

- **Dashboard** (Home page) remains fully accessible
- **All other pages** (Products, Groups, Clients, Orders) display a license required page
- **All AJAX controllers** (except Dashboard) return a 403 error

### After Activating a License

1. The warning banner disappears
2. All reports and pages become accessible
3. Enter your license key in **Setup** > **Addon Modules** > **PUQ Product Analytics** > **Configure**

### Purchase a License

**[https://puqcloud.com/store/whmcs-addon-modules](https://puqcloud.com/store/whmcs-addon-modules)**

For license-related questions, please contact us via the ticket system:

**[https://puqcloud.com/submitticket.php](https://puqcloud.com/submitticket.php?step=2&deptid=1)**


<!-- sync:6ca772c970efc575 -->