PHPackages                             retargeting/retargeting-sdk - 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. retargeting/retargeting-sdk

ActiveLibrary

retargeting/retargeting-sdk
===========================

Retargeting SDK

1.0.0(6y ago)06.6k↓100%PHPPHP &gt;=7.1.0

Since Apr 15Pushed 6y ago2 watchersCompare

[ Source](https://github.com/retargeting/php-sdk)[ Packagist](https://packagist.org/packages/retargeting/retargeting-sdk)[ RSS](/packages/retargeting-retargeting-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

Retargeting SDK
===============

[](#retargeting-sdk)

Overview
--------

[](#overview)

Retargeting SDK is a software development tool for E-Commerce platforms that simplifies the implementation of Retargeting extension.

Minimum requirements
--------------------

[](#minimum-requirements)

The Retargeting SDK requires at least PHP version 7.1.0 or greater.

How to install
--------------

[](#how-to-install)

Clone the repository in your platform root folder.

Example
-------

[](#example)

### Product class for sendProduct implementation

[](#product-class-for-sendproduct-implementation)

#### Sample request

[](#sample-request)

```
use Retargeting/Product;

$brand = [
     'id' => 8,
     'name' => 'Apple'
];

$category = [
    [
      "id" => 20,
      "name" => "Desktop",
      "parent" => false,
      "breadcrumb" => []
    ],
    [
      "id" => 28,
      "name" => "Monitors",
      "parent" => 25,
      "breadcrumb" => [
          ["id" => 25, "name" => "Components", "parent" => false]
    ]
];

$inventory = [
    'variations' => true,
    'stock' => [
        'Red' => true,
        'Small' => false,
        'Medium' => true,
    ]
];

$additionalImages = [
    "http://localhost/upload/image/catalog/demo/canon_logo.jpg",
    "http://localhost/upload/image/catalog/demo/hp_1.jpg",
    "http://localhost/upload/image/catalog/demo/compaq_presario.jpg",
    "http://localhost/upload/image/catalog/demo/canon_eos_5d_1.jpg",
    "http://localhost/upload/image/catalog/demo/canon_eos_5d_2.jpg"
];

$product = new Product();
$product->setId(42);
$product->setName('Shoes');
$product->setUrl('http://localhost/upload/test');
$product->setImg('http://localhost/upload/image/catalog/demo/apple_cinema_30.jpg');
$product->setPrice(122);
$product->setPromo(90);
$product->setBrand($brand);
$product->setCategory($category);
$product->setInventory($inventory);
$product->setAdditionalImages($additionalImages)

echo $product->getData();
```

#### Sample response

[](#sample-response)

```
[
    {
        "id": 42,
        "name": "Apple Cinema 30\"",
        "url": "http://localhost/upload/test",
        "img": "http://localhost/upload/image/catalog/demo/apple_cinema_30.jpg",
        "price": 122,
        "promo": 90,
        "brand": {
            "id": "8",
            "name": "Apple"
        },
        "category": [
            {
                "id": "20",
                "name": "Desktops",
                "parent": false,
                "breadcrumb": []
            },
            {
                "id": "28",
                "name": "Monitors",
                "parent": "25",
                "breadcrumb": [
                    {
                        "id": "25",
                        "name": "Components",
                        "parent": false
                    }
                ]
            }
        ],
        "inventory": {
            "variations": true,
            "stock": {
                "Small": true,
                "Medium": true,
                "Large": true,
                "Checkbox 1": true,
                "Checkbox 2": true,
                "Checkbox 3": true,
                "Checkbox 4": true,
                "Red": true,
                "Blue": true,
                "Green": true,
                "Yellow": true
            }
        },
        "images": [
            "http://localhost/upload/image/catalog/demo/canon_logo.jpg",
            "http://localhost/upload/image/catalog/demo/hp_1.jpg",
            "http://localhost/upload/image/catalog/demo/compaq_presario.jpg",
            "http://localhost/upload/image/catalog/demo/canon_eos_5d_1.jpg",
            "http://localhost/upload/image/catalog/demo/canon_eos_5d_2.jpg"
        ]
    }
]
```

**Method****Type****Required****Description**setIdNumber or textRequiredThe product item identifier, ie. itemcode. It should identify to the sold product, but not necessarily some specific variant of the product. Must be unique in your site.setNameTextRequiredThe product namesetUrlURLRequiredComplete URL of the item. Must start with http:// or https://.setImgURLRequiredComplete URL of an image of the item.setPriceNumber or textRequiredCurrent product price. If the product is on promotion (price is reduced) then this parameter gets the value of the price before promotion was applied to the product (old price).setPromoNumber or textOptionalPromotional price (new price). When the product isn’t on promotion (no reduced price), send value 0.setBrandObjectRequiredDetails about product brand. If the product does not belong to any brand, send false value. The object containing brand details, has the following properties: id, name.brand.idNumber or textRequiredThe brand item identifier.brand.nameTextRequiredBrand namesetCategoryObjectRequiredAn object that contain details about products category. The object should contain the following properties: id, name, parentcategory.idNumber or textRequiredThe category identifiercategory.nameTextRequiredCategory namecategory.parentNumber, text, falseRequiredId of parent category. If there isn’t any parent category, send false value.setBreadcrumbArrayRequiredArray containing all the parent categories of the category to which the product belongs (in this array you must not add the product category). If the category does not have a parent category (category.parent is set false), send an empty array. Each parent category is sent as object and contains the following properties: id, name, parent.breadcrumb.idNumber or textRequiredCategory idbreadcrumb.nameTextRequiredCategory Namebreadcrumb.parentNumber, text, falseRequiredId of parent category. If there isn’t any parent category, send false value.setInventoryObjectRequiredInventory detailsinventory.variationsTrue/FalseRequiredTrue for products with variations. False for products without variations.inventory.stockTrue/False/ObjectRequiredFor product with variations, you should send an object with stock for each variations.setAdditionalImagesObjectRequiredAll product images can be assigned here. Accepts an object of urls.callback\_functionFunctionOptionalWith this parameter you can define a function that runs itself after the action’s parent function executes

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

Unknown

Total

1

Last Release

2537d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8584e0884e729c441089b39cda81a2bdf0c0d876eb388d247010098c10c5e7b?d=identicon)[retargeting](/maintainers/retargeting)

---

Top Contributors

[![bratucornel](https://avatars.githubusercontent.com/u/989610?v=4)](https://github.com/bratucornel "bratucornel (4 commits)")[![andreicotaga1](https://avatars.githubusercontent.com/u/48317497?v=4)](https://github.com/andreicotaga1 "andreicotaga1 (1 commits)")[![retargetingbiz](https://avatars.githubusercontent.com/u/11837374?v=4)](https://github.com/retargetingbiz "retargetingbiz (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/retargeting-retargeting-sdk/health.svg)

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

PHPackages © 2026

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