PHPackages                             adback/adback-sdk-php-symfony - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. adback/adback-sdk-php-symfony

ActiveSymfony-bundle

adback/adback-sdk-php-symfony
=============================

A bundle to use the AdBack ApiClient

v2.9.0(6y ago)210.6k1MITPHPCI failing

Since Jan 10Pushed 6y ago2 watchersCompare

[ Source](https://github.com/adback-anti-adblock-solution/adback-sdk-php-symfony)[ Packagist](https://packagist.org/packages/adback/adback-sdk-php-symfony)[ RSS](/packages/adback-adback-sdk-php-symfony/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (25)Used By (0)

Adback/ApiClientBundle
======================

[](#adbackapiclientbundle)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0b0b14d1039ee26b1c0ea7dd13383f303a79e0d5b999bfcc881a7ad8f56d9b65/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656b616c65652f61646261636b2d616e616c79746963732d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dekalee/adback-analytics-bundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/f803352fe553f55b700d8cc83baa3395ccb1c54fcad7460f643c6309e37a344b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656b616c65652f61646261636b2d616e616c79746963732d62756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dekalee/adback-analytics-bundle/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/3d287870281012d774ca9140a95f1f8ea12656b3c47cf03e5631854048f46379/68747470733a2f2f706f7365722e707567782e6f72672f64656b616c65652f61646261636b2d616e616c79746963732d62756e646c652f762f737461626c65)](https://packagist.org/packages/dekalee/adback-analytics-bundle)[![Total Downloads](https://camo.githubusercontent.com/994edb65fcadd04753e2c52ca6b99158f85f61ed641c5562ea295816c33de157/68747470733a2f2f706f7365722e707567782e6f72672f64656b616c65652f61646261636b2d616e616c79746963732d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/dekalee/adback-analytics-bundle)[![License](https://camo.githubusercontent.com/d64e782d869ac2e16e007a861e21f9e1b1765f27264e845909c1a2677d74d5c2/68747470733a2f2f706f7365722e707567782e6f72672f64656b616c65652f61646261636b2d616e616c79746963732d62756e646c652f6c6963656e7365)](https://packagist.org/packages/dekalee/adback-analytics-bundle)

This bundle will use the library to call the AdBack api.

See [the AdBack website](https://www.adback.co/) for more informations.

Installation
------------

[](#installation)

Launch the composer command :

```
    composer require adback/adback-sdk-php-symfony
```

If you are using a version of symfony &gt;= 4, it should automatically activate the bundle.

If you are using a version of symfony &lt; 4, you have to add the bundle to your `AppKernel.php` file :

```
    new Adback\ApiClientBundle\Adback\ApiClientBundle(),
```

Configuration
-------------

[](#configuration)

### Symfony 4

[](#symfony-4)

In your `.env` file, the following lines should have been added :

```
    ADBACK_API_CLIENT_ACCESS_TOKEN=adback-access-token
```

Modify it with the token provided by the AdBack team.

Then follow the paragraph linked to the type of cache you have choosen :

#### Redis

[](#redis)

In the `config/packages/adback_sdk_php.yaml` you should add the following configuration :

```
    cache_type: redis
    cache_service: redis_service
```

`redis_service` is the name of the redis connection you are using to store the data.

#### Doctrine

[](#doctrine)

In the `config/packages/adback_sdk_php.yaml` you should add the following configuration :

```
    cache_type: doctrine
    entity_manager: doctrine.orm.entity_manager
```

`doctrine.orm.entity_manager` is the name of the doctrine connection you are using to store the data.

Do not forget to create the table linked to the AdBack sdk.

#### Custom

[](#custom)

If you want to write your own cache driver, you should create a class that implements `Adback\ApiClient\Driver\ScriptCacheInterface` and name this service `adback_api_client.script_cache`.

In the `config/packages/adback_sdk_php.yaml` you should add the following configuration :

```
    cache_type: custom
```

If the service is missing, an error will be issued by the Symfony DIC when the service is being used.

### Symfony &lt; 4

[](#symfony--4)

In your `app/config/config.yml` file, you should add the following lines :

```
    adback_api_client:
        access_token: "your-access-token"
```

Modify it with the token provided by the AdBack team.

Then follow the paragraph linked to the type of cache you have choosen :

#### Redis

[](#redis-1)

In the `app/config/config.yml` you should add the following configuration :

```
    adback_api_client:
        cache_type: redis
        cache_service: redis_service
```

`redis_service` is the name of the redis connection you are using to store the data.

#### Doctrine

[](#doctrine-1)

In the `app/config/config.yml` you should add the following configuration :

```
    adback_api_client:
        cache_type: doctrine
        entity_manager: doctrine.orm.entity_manager
```

`doctrine.orm.entity_manager` is the name of the doctrine connection you are using to store the data.

Do not forget to create the table linked to the AdBack sdk.

#### Custom

[](#custom-1)

If you want to write your own cache driver, you should create a class that implements `Adback\ApiClient\Driver\ScriptCacheInterface` and name this service `adback_api_client.script_cache`.

In the `app/config/config.yml` you should add the following configuration :

```
    adback_api_client:
        cache_type: custom
```

If the service is missing, an error will be issued by the Symfony DIC when the service is being used

### Script Type

[](#script-type)

There is two possibilities for the script you could get.

#### Small scripts

[](#small-scripts)

This configuration will only load the AdBack script from an external url.

This usage is good for a quick start.

### Full scripts

[](#full-scripts)

This configuration will load our full script or bootscrap script.

This will allow us to deliver a script which is more flexible when the blocking in place are harder.

This solution is recommanded for an advanced usage.

Usage
-----

[](#usage)

### Refresh command

[](#refresh-command)

In order to have the AdBack script always up-to-date you should launch the command `adback:api-client:refresh-tag`periodically (at least once a day).

This command will call our api and store the response in the cache type you have chosen

### Add the script to your pages

[](#add-the-script-to-your-pages)

At the bottom of your webpages, you should add the script twig generation function :

```
    {{ adback_generate_scripts() }}
```

Full configuration description
------------------------------

[](#full-configuration-description)

```
    adback_api_client:
        access_token:         ~ # Required, Your personnal access token
        api_url:              'https://adback.co/api' # The base url for the api
        script_url:           script/me # The api url used to get the script
        cache_type:           redis # The cache type you are using
        generator_type:       script # The type of script you are generating
        cache_service:        redis # The service used for the caching
        entity_manager:       doctrine.orm.entity_manager # The entity manager used (only if you use the doctrine cache

        # This key is used if multiple website access the same database
        key_prefix:           ''
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 79.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~90 days

Total

24

Last Release

2515d ago

Major Versions

v1.6.0 → v2.0.02017-07-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2675545?v=4)[Nicolas Thal](/maintainers/nicolasThal)[@nicolasThal](https://github.com/nicolasThal)

![](https://www.gravatar.com/avatar/81e74183a746c1d0813128bea90894477d621a72a1290bc540c225728f70109e?d=identicon)[victorbalssa](/maintainers/victorbalssa)

![](https://www.gravatar.com/avatar/3e7a56d7ca9e1f0bedbf35b7d5ee8a2d8e96a9d20888108b2c021570978544cb?d=identicon)[gignonje](/maintainers/gignonje)

![](https://www.gravatar.com/avatar/bce05fefcead2a9f1fadaa947173566615109994b6abfc58e1b28ea92d0f551f?d=identicon)[gbd\_dkl](/maintainers/gbd_dkl)

---

Top Contributors

[![nicolasThal](https://avatars.githubusercontent.com/u/2675545?v=4)](https://github.com/nicolasThal "nicolasThal (67 commits)")[![victorbalssa](https://avatars.githubusercontent.com/u/12813321?v=4)](https://github.com/victorbalssa "victorbalssa (8 commits)")[![sempixel](https://avatars.githubusercontent.com/u/1658628?v=4)](https://github.com/sempixel "sempixel (6 commits)")[![gignonje](https://avatars.githubusercontent.com/u/1492645?v=4)](https://github.com/gignonje "gignonje (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adback-adback-sdk-php-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/adback-adback-sdk-php-symfony/health.svg)](https://phpackages.com/packages/adback-adback-sdk-php-symfony)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
